예제 #1
0
        private bool setForumPolicy(ForumPolicy p)
        {
            int i_pdp = 2;
            postDeletionPermission e_pdp = p.getPostDeletionPermissions();

            switch (e_pdp)
            {
            case postDeletionPermission.MODERATOR:
                i_pdp = 3;
                break;

            case postDeletionPermission.ADMIN:
                i_pdp = 4;
                break;

            case postDeletionPermission.SUPER_ADMIN:
                i_pdp = 5;
                break;
            }
            int i_mup = 2;
            modUnassignmentPermission e_mup = p.getModUnassignmentPermissions();

            switch (e_mup)
            {
            case modUnassignmentPermission.ASSIGNING_ADMIN:
                i_mup = 3;
                break;

            case modUnassignmentPermission.SUPER_ADMIN:
                i_mup = 4;
                break;
            }
            if (!ForumSystem._db.changeForumPolicy(p.getMaxAdmins(), p.getMinAdmins(), p.getMaxModerators(), p.getMinModerators(), _name,
                                                   i_pdp, p.getPasswordLifespan(), p.getModeratorsSeniority(), i_mup))
            {
                return(false);
            }
            return(true);
        }
예제 #2
0
 public int getPasswordLifespan()
 {
     return((_policy == null) ? -1 : _policy.getPasswordLifespan());
 }
예제 #3
0
 public int getPasswordLifespan()
 {
     return(_policy.getPasswordLifespan());
 }