Exemplo n.º 1
0
        public static SPGlymaRoleFactory GetInstance(int securableContextId)
        {
            lock (padlock)
            {
                if (!spGlymaRoleFactories.ContainsKey(securableContextId))
                {
                    spGlymaRoleFactories[securableContextId] = new SPGlymaRoleFactory(securableContextId);
                }

                return(spGlymaRoleFactories[securableContextId]);
            }
        }
Exemplo n.º 2
0
        public static SPGlymaRoleFactory GetInstance(int securableContextId)
        {
            lock (padlock)
            {
                if (!spGlymaRoleFactories.ContainsKey(securableContextId))
                {
                    spGlymaRoleFactories[securableContextId] = new SPGlymaRoleFactory(securableContextId);
                }

                return spGlymaRoleFactories[securableContextId];
            }
        }
Exemplo n.º 3
0
        private IRole GetRole(string roleName)
        {
            IRole role;

            switch (roleName)
            {
            case GlymaProjectManagerRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaProjectManagerRole;
                break;

            case GlymaMapManagerRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaMapManagerRole;
                break;

            case GlymaMapAuthorRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaMapAuthorRole;
                break;

            case GlymaMapReaderRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaMapReaderRole;
                break;

            case OldGlymaMapAuthorRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaMapAuthorRole;
                break;

            case OldGlymaMapReaderRoleName:
                role = SPGlymaRoleFactory.GetInstance(SecurableContextId.Value).GlymaMapReaderRole;
                break;

            default:
                role = null;
                break;
            }

            return(role);
        }