Exemplo n.º 1
0
        public PortalOperationManager(IServiceScope scope)
        {
#if DEBUG
            if (typeof(T).IsInterface)
            {
                throw new Exception($"PortalOperationManager should be service type not interface. {typeof(T).FullName}");
            }
#endif
            RegisterPortalOperations();
            Scope = scope;
            AuthorizationRuleManager = scope.Resolve <IAuthorizationRuleManager <T> >();
        }
 public static void RegisterAuthorizationRules(IAuthorizationRuleManager authorizationRuleManager)
 {
     authorizationRuleManager.AddRule <IAuthorizationGrantedRule>();
 }