Base solution for your next web application

Activities of "behiunforgiven"

Answer

Can You help me to override "UserValidator" ?

Answer

I wrote PasswordValidator like this

PasswordValidator = new PasswordValidator() {
                RequiredLength = 6,
                RequireNonLetterOrDigit = false,
                RequireDigit = false,
                RequireLowercase = false,
                RequireUppercase = false
            };

but I Can't create UserValidator because of its arguments

UserValidator = new UserValidator<ApplicationUser>(manager)
            {
                AllowOnlyAlphanumericUserNames = false,
                RequireUniqueEmail = false
            };

what is "ApplicationUser" and "manager" in Module Zero?

Answer

I made UserValidator Like this

UserValidator = new UserValidator<User, long>(this)
            {
                RequireUniqueEmail = false,
                AllowOnlyAlphanumericUserNames = false
            };

in the constructor of UserManager, but it still has Error on Emails. I want to Use One Email for All users and Authenticate them only by UserName;

Why AbpSession.UserId is null in my Application layer? I disabled multytenancy!

this code

Thread.CurrentPrincipal.Identity.GetUserId()

Returns null and

Thread.CurrentPrincipal.Identity.IsAuthenticated

is False !

Thank You, but User is logged in and U use module-zero

I create it from Templates

I found the problem! The problem is that I want to get Current user Information in NavigationProvider to generate menu items according to user Roles ! and when NavigationProvider Creates menu No user is Logged in.

So my question changed to this:

HOW CAN I GENERATE MENU ACCORDING TO USER ROLES?

<cite>hikalkan: </cite> Hi,

You can not get UserId in NavigationProvider since it's executed once on application startup, independent from users.

You can use permissions (instead of roles) to authorize menu items. See Navigation document: <a class="postlink" href="http://www.aspnetboilerplate.com/Pages/Documents/Navigation">http://www.aspnetboilerplate.com/Pages/ ... Navigation</a>

Thank You So Much ! I didn't notice that !

You Are So Fantastic...

<cite>hikalkan: </cite>

  1. We should not define states (or routes) if user has no permission to that page. This prevents user to enter to the page by writing url.

how can You check permission in client side?

Is it Possible to define permissions in AbpPermission in database?

I define a permission

public class EPEDCAuthorizationProvider : AuthorizationProvider
    {
        public override void SetPermissions(IPermissionDefinitionContext context)
        {
            var administration = context.CreatePermission("Administration", new FixedLocalizableString("Site Admin"), true);
        }

    }

but it is not stored anywhere ! and All Users are granted for it by default!

How can I define Permissions for specific Roles and Users?

Showing 11 to 20 of 33 entries