PrepareGroup() public static method

Prepends the proper string to the group name.
public static PrepareGroup ( string group ) : string
group string The group name.
return string
Ejemplo n.º 1
0
        /// <summary>
        /// Gets all the actions for global resources that are denied to a group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <returns>The denied actions.</returns>
        public static string[] RetrieveDenialsForGlobals(UserGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RetrieveDenialsForGlobals(AuthTools.PrepareGroup(group.Name)));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets all the actions for a page that are denied to a group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="page">The page.</param>
        /// <returns>The granted actions.</returns>
        public static string[] RetrieveDenialsForPage(UserGroup group, PageInfo page)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RetrieveDenialsForPage(AuthTools.PrepareGroup(group.Name), page));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets all the actions for a directory that are denied to a group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="provider">The provider.</param>
        /// <param name="directory">The directory.</param>
        /// <returns>The denied actions.</returns>
        public static string[] RetrieveDenialsForDirectory(UserGroup group, IFilesStorageProviderV30 provider, string directory)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RetrieveDenialsForDirectory(AuthTools.PrepareGroup(group.Name), provider, directory));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Gets all the actions for a page that are granted to a group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="pageFullName">The page full name.</param>
        /// <returns>The granted actions.</returns>
        public string[] RetrieveGrantsForPage(UserGroup group, string pageFullName)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RetrieveGrantsForPage(AuthTools.PrepareGroup(group.Name), pageFullName));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets all the actions for a namespace that are granted to a group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="nspace">The namespace (<c>null</c> for the root).</param>
        /// <returns>The granted actions.</returns>
        public static string[] RetrieveGrantsForNamespace(UserGroup group, NamespaceInfo nspace)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RetrieveGrantsForNamespace(AuthTools.PrepareGroup(group.Name), nspace));
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Removes all the ACL Entries for a namespace that are bound to a user group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="nspace">The namespace (<c>null</c> for the root).</param>
        /// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
        public bool RemoveEntriesForNamespace(UserGroup group, NamespaceInfo nspace)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RemoveEntriesForNamespace(AuthTools.PrepareGroup(group.Name), nspace));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Removes all the ACL Entries for a directory that are bound to a user group.
        /// </summary>
        /// <param name="group">The group.</param>
        /// <param name="provider">The provider.</param>
        /// <param name="directory">The directory.</param>
        /// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
        public bool RemoveEntriesForDirectory(UserGroup group, IFilesStorageProviderV40 provider, string directory)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RemoveEntriesForDirectory(AuthTools.PrepareGroup(group.Name), provider, directory));
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Removes all the ACL Entries for global resources that are bound to a user group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
        public bool RemoveEntriesForGlobals(UserGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RemoveEntriesForGlobals(AuthTools.PrepareGroup(group.Name)));
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Sets a permission for a global resource.
        /// </summary>
        /// <param name="status">The authorization status.</param>
        /// <param name="action">The action of which to modify the authorization status.</param>
        /// <param name="group">The group subject of the authorization change.</param>
        /// <returns><c>true</c> if the authorization status is changed, <c>false</c> otherwise.</returns>
        public bool SetPermissionForGlobals(AuthStatus status, string action, UserGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(SetPermissionForGlobals(status, action, AuthTools.PrepareGroup(group.Name)));
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Sets a permission for a directory.
        /// </summary>
        /// <param name="status">The authorization status.</param>
        /// <param name="provider">The provider that handles the directory.</param>
        /// <param name="directory">The directory.</param>
        /// <param name="action">The action of which to modify the authorization status.</param>
        /// <param name="group">The group subject of the authorization change.</param>
        /// <returns><c>true</c> if the authorization status is changed, <c>false</c> otherwise.</returns>
        public bool SetPermissionForDirectory(AuthStatus status, IFilesStorageProviderV40 provider, string directory, string action, UserGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(SetPermissionForDirectory(status, provider, directory, action, AuthTools.PrepareGroup(group.Name)));
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Removes all the ACL Entries for a page that are bound to a user group.
        /// </summary>
        /// <param name="group">The user group.</param>
        /// <param name="page">The page.</param>
        /// <returns><c>true</c> if the operation succeeded, <c>false</c> otherwise.</returns>
        public static bool RemoveEntriesForPage(UserGroup group, PageInfo page)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(RemoveEntriesForPage(AuthTools.PrepareGroup(group.Name), page));
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Sets a permission for a page.
        /// </summary>
        /// <param name="status">The authorization status.</param>
        /// <param name="page">The page.</param>
        /// <param name="action">The action of which to modify the authorization status.</param>
        /// <param name="group">The group subject of the authorization change.</param>
        /// <returns><c>true</c> if the authorization status is changed, <c>false</c> otherwise.</returns>
        public static bool SetPermissionForPage(AuthStatus status, PageInfo page, string action, UserGroup group)
        {
            if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            return(SetPermissionForPage(status, page, action, AuthTools.PrepareGroup(group.Name)));
        }