C# Class ScrewTurn.Wiki.AuthChecker

Utility class for checking permissions and authorizations.
All the methods in this class implement a security bypass for the admin user.
显示文件 Open project: mono/ScrewTurnWiki Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
CheckActionForDirectory ( IFilesStorageProviderV30 provider, string directory, string action, string currentUser, string groups ) : bool

Checks whether an action is allowed for a directory.

CheckActionForGlobals ( string action, string currentUser, string groups ) : bool

Checks whether an action is allowed for the global resources.

CheckActionForNamespace ( NamespaceInfo nspace, string action, string currentUser, string groups ) : bool

Checks whether an action is allowed for a namespace.

CheckActionForPage ( System.PageInfo page, string action, string currentUser, string groups ) : bool

Checks whether an action is allowed for a page.

Method Details

CheckActionForDirectory() public static method

Checks whether an action is allowed for a directory.
public static CheckActionForDirectory ( IFilesStorageProviderV30 provider, string directory, string action, string currentUser, string groups ) : bool
provider IFilesStorageProviderV30 The provider that manages the directory.
directory string The full path of the directory.
action string The action the user is attempting to perform.
currentUser string The current user.
groups string The groups the user is member of.
return bool

CheckActionForGlobals() public static method

Checks whether an action is allowed for the global resources.
public static CheckActionForGlobals ( string action, string currentUser, string groups ) : bool
action string The action the user is attempting to perform.
currentUser string The current user.
groups string The groups the user is member of.
return bool

CheckActionForNamespace() public static method

Checks whether an action is allowed for a namespace.
public static CheckActionForNamespace ( NamespaceInfo nspace, string action, string currentUser, string groups ) : bool
nspace NamespaceInfo The current namespace (null for the root).
action string The action the user is attempting to perform.
currentUser string The current user.
groups string The groups the user is member of.
return bool

CheckActionForPage() public static method

Checks whether an action is allowed for a page.
public static CheckActionForPage ( System.PageInfo page, string action, string currentUser, string groups ) : bool
page System.PageInfo The current page.
action string The action the user is attempting to perform.
currentUser string The current user.
groups string The groups the user is member of.
return bool