Base solution for your next web application

Activities of "andmattia"

Question

Hi

I have a problem when login faild. The UI not intercept exception. If I start a project from temple it's works fine but I have do a lot off work with my module. I think is very stupid error but I don't find it!

I check the controller and it intercpet the login excepion and send to browser:

default: throw CreateExceptionForFailedLoginAttempt(loginResult.Result, usernameOrEmailAddress, tenancyName);

but ui not render exception! Abp.UI.UserFriendlyException: [LoginFailed] on my console error 500 and not call

.done(function (data) { abp.ajax.handleResponse(data, userOptions, $dfd);

Where can I try to search e possibile mis configuration?

thk

Mattia

Hi

is possibile to use ILocalizationManager inside a core class. I try to localazie exception but I don't have idea where put localiziation or how can I do that.

Mattia

Hi

I need to set, dipending on my profile, where is the default route in angular.

in app.js how can I do that? suppose in core/application I have already store or set this parameter.

I think is a global user settings. Is it correct?

Question

In module zero is not a standard option to add a new user with new tenant?

mat

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 {

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?

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?

Question

Hi

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

Mat

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 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

Showing 1 to 10 of 64 entries