Base solution for your next web application

Activities of "andmattia"

I try to check if a user has one permission depending on a feature. I try to explain; feature -- UseApplication1 -> featureDependency: new SimpleFeatureDependency("UseApplication1") -- UseApplication2 -> featureDependency: new SimpleFeatureDependency("UseApplication2")

Permission all permission depend on -- Document -> featureDependency: new SimpleFeatureDependency("UseApplication2") ---| Add -> featureDependency: new SimpleFeatureDependency("UseApplication2") ---| Update -> featureDependency: new SimpleFeatureDependency("UseApplication2") ... -- Application-> featureDependency: new SimpleFeatureDependency("UseApplication1") ---| Add -> featureDependency: new SimpleFeatureDependency("UseApplication1") ---| Update -> featureDependency: new SimpleFeatureDependency("UseApplication1")

1 user -- Has permission Document,Add,Update 2 user -- has no permission

If i get all feature and I check if is enable in tenant if(await FeatureChecker.IsEnabledAsync(feature.Name))

now I need to check if user has one(or more) permission enable depending on this feature ...

var user = await UserManager.GetUserByIdAsync(AbpSession.UserId.Value); var userPermission = await UserManager.GetGrantedPermissionsAsync(user); userPermission.Where(t=>t.FeatureDependency())

... But How can I check if exists 1 (or more) check permission depending on my feature mattia

Question

Hi

I've an application that user can make a reservation and a lot of logic based on datetime, so in client side the user set a datepicker with 9:00 AM and I set my time zone in UTC +1, when data came from client to server in server side i see time set to 7:00 am and this value will be stored in database.

How is the best approch? Save on database in converted format or save in UTC?

I try to create a new directive but I get this error on the production enviroment.

I create a file in App/common/driective/draggable.js

js?v=RTs-jMDzy1oFTjfGGE0IY6oLP7brKVmncyDjZJ5wE9k1:1454 Error: [$injector:unpr] <a class="postlink" href="http://errors.angularjs.org/1.5.0/$injector/unpr?p0=nProvider%20%3C-%20n%20%3C-%20draggableDirective">http://errors.angularjs.org/1.5.0/$inje ... eDirective</a>

Any idea to solve it?

Question

Hi

Map dll say that Mapper.Map(obj1,obj2); is obsolate how can I solve this issue? work around?

Mat

Ok, I found the issue/solution.

about check box the issue is related to jquery-uniform, I need to copy images folder on /Bundles/App and I solve it!

Mat

Hi ISMCAGDAS

I have create & upload 2 screen shot. I check the html generated and it's similar but in production I have budnled file CSS reather then in debug.

[attachment=0:12g2mwpy]debug.jpg[/attachment:12g2mwpy]

Question

I've a strange situation in debug I use this code

<div class="portlet light">
        <div class="portlet-title">
            <div class="inputs inputs-full-width">
                <div class="portlet-input">
                        <div class="row">
                            <div class="col-lg-10">
                                <form>
                                    <div class="input-group">
                                        <input ng-model="vm.requestParams.note" auto-focus class="form-control" placeholder="@L("SearchWithThreeDot")" type="text">
                                        <span class="input-group-btn">
                                            <button ng-click="vm.getModels()" class="btn btn-default" type="submit"><i class="icon-magnifier"></i></button>
                                        </span>
                                    </div>
                                </form>
                            </div> ....

and I see the lens with gray boxed but when I go to production it doesn't show me, so and same issue on checkbox or modal.

Any idea?

I try to make a similar oparation (without tenant) but I catch "the not logged in expection [CurrentUserDidNotLoginToTheApplication]" in angular becuse at startup the app call appModule.factory('appSession' ...

abp.services.app.session.getCurrentLoginInformations // get error

How can I prevent this error?

The Idea is to use same anugular app, if is it possibile, for anonymous and logged user mat

In according to custom repository <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/EntityFramework-Integration#DocCustomRepositoryMethods">http://www.aspnetboilerplate.com/Pages/ ... oryMethods</a>.

Where is the right place to put your custom repository?

I try to use 2 db connection 1 to MSSQL (abp-zero [roles,users,etc]) one to business data on MySQL.

I use the sample code from <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/MultipleDbContextDemo">https://github.com/aspnetboilerplate/as ... ontextDemo</a> and I create the table and it's work when I call a method, based on a AbpModule to need data from MySql i catch an excection System.Data.Entity.Core.EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details. ---> System.Data.SqlClient.SqlException: Invalid object name 'mdm.app_fd_tb_company'. in System.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__167_0(Task1 result) in System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() in System.Threading.Tasks.Task.Execute() So the excetion is relate to System.Data.SqlClient and not to MySql. How can tell to ABP that need to use EF for MySql and not to SQL server.

Another operation that I need to do is to set the initializer Database.SetInitializer<mySqlDbContext>(null); If I not set this row code first say me the database are not update

my db context refered to mysql is declared in this way [DbConfigurationType(typeof(MySqlEFConfiguration))] public class mySqlDbContext : AbpDbContext {

Showing 181 to 190 of 200 entries