public static SecurityTool GetSecurityTool(ISecurity f, MvcContext ctx)
        {
            IList forumRoles = ForumRole.GetAll();

            IList ownerRoles;

            if (ctx.owner.obj.GetType() != typeof(Site))
            {
                ownerRoles = ctx.owner.obj.GetRoles();
            }
            else
            {
                ownerRoles = new ArrayList();
            }

            IList siteRoles = new SiteRoleService().GetRoleAndRank();

            IList allRoles = new RoleMerger()
                             .Add(forumRoles)
                             .Add(ownerRoles)
                             .Add(siteRoles)
                             .GetResults();

            SecurityTool tool = new SecurityTool(f, new SecurityAction(), allRoles);

            return(tool);
        }
예제 #2
0
 public PermissionFrontController()
 {
     siteRoleService        = new SiteRoleService();
     appService             = new SiteAppService();
     appService.menuService = new SiteMenuService();
     logService             = new SiteLogService();
 }
예제 #3
0
 public UserController()
 {
     userService  = new UserService();
     roleService  = new SiteRoleService();
     msgService   = new MessageService();
     logService   = new SiteLogService();
     confirmEmail = new ConfirmEmail();
 }
예제 #4
0
        public UserService()
        {
            currencyService   = new CurrencyService();
            roleService       = new SiteRoleService();
            userIncomeService = new UserIncomeService();

            hashTool = new HashTool();
        }
예제 #5
0
        public PermissionBackController()
        {
            SiteRoleService = new SiteRoleService();
            appInfoService  = new AppInstallerService();

            appService             = new SiteAppService();
            appService.menuService = new SiteMenuService();
            logService             = new SiteLogService();
        }
예제 #6
0
        //---------------------------------------------------------

        public void AdminIndex()
        {
            target(SaveAppAdminRole);

            List <SiteRole> roles = SiteRoleService.GetAdminRoles();
            IList           apps  = appService.GetByMember(Site.Instance.Id);

            bindAppList(apps);
            bindRoleList(roles, apps);
        }
예제 #7
0
        //---------------------------------------------------------

        public void UserDataAdmin()
        {
            target(SaveSecuritySetting);

            List <SiteRole>     roles = SiteRoleService.GetAdminRoles();
            List <AppInstaller> apps  = appInfoService.GetUserDataAdmin();

            bindUaAppList(apps);
            bindUaRoleList(roles, apps);
        }
예제 #8
0
 public CreditController()
 {
     incomeService   = new UserIncomeService();
     roleService     = new SiteRoleService();
     currencyService = new CurrencyService();
 }
예제 #9
0
 public SecurityController()
 {
     roleService = new SiteRoleService();
     logService  = new SiteLogService();
 }
예제 #10
0
 public UserIncomeService()
 {
     currencyService = new CurrencyService();
     roleService     = new SiteRoleService();
 }