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
コード例 #1
0
ファイル: AuthReader.cs プロジェクト: sehurry/ScrewTurnWiki
        /// <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)));
        }
コード例 #2
0
ファイル: AuthReader.cs プロジェクト: sehurry/ScrewTurnWiki
        /// <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));
        }
コード例 #3
0
ファイル: AuthReader.cs プロジェクト: sehurry/ScrewTurnWiki
        /// <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));
        }
コード例 #4
0
ファイル: AuthReader.cs プロジェクト: ahmedfe/screwturn
        /// <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));
        }
コード例 #5
0
ファイル: AuthReader.cs プロジェクト: sehurry/ScrewTurnWiki
        /// <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));
        }
コード例 #6
0
ファイル: AuthWriter.cs プロジェクト: ahmedfe/screwturn
        /// <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));
        }
コード例 #7
0
ファイル: AuthWriter.cs プロジェクト: ahmedfe/screwturn
        /// <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));
        }
コード例 #8
0
ファイル: AuthWriter.cs プロジェクト: ahmedfe/screwturn
        /// <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)));
        }
コード例 #9
0
ファイル: AuthWriter.cs プロジェクト: ahmedfe/screwturn
        /// <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)));
        }
コード例 #10
0
ファイル: AuthWriter.cs プロジェクト: ahmedfe/screwturn
        /// <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)));
        }
コード例 #11
0
ファイル: AuthWriter.cs プロジェクト: Pathfinder-Fr/Website
        /// <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));
        }
コード例 #12
0
ファイル: AuthWriter.cs プロジェクト: Pathfinder-Fr/Website
        /// <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)));
        }