예제 #1
0
 public AccessAttribute(IRequestContext requestContext,
                        ApplicationEnum.ModuleName moduleName,
                        ApplicationEnum.ModuleActionType actionType)
 {
     _requestContext = requestContext;
     ModuleName      = moduleName;
     ActionType      = actionType;
 }
예제 #2
0
        private bool IsAccessModule(ApplicationEnum.ModuleActionType actionType, UserModule userModule)
        {
            switch (actionType)
            {
            case ApplicationEnum.ModuleActionType.Add:
                return(userModule.IsAdd);

            case ApplicationEnum.ModuleActionType.Edit:
                return(userModule.IsEdit);

            case ApplicationEnum.ModuleActionType.Delete:
                return(userModule.IsDelete);

            case ApplicationEnum.ModuleActionType.View:
                return(userModule.IsView);

            default:
                return(false);
            }
        }