C# Class ScrewTurn.Wiki.AuthWriter

Utility class for writing permissions and authorizations.
Mostra file Open project: mono/ScrewTurnWiki Class Usage Examples

Private Properties

Property Type Description
GetLogMessage string
RemoveEntriesForDirectory bool
RemoveEntriesForGlobals bool
RemoveEntriesForNamespace bool
RemoveEntriesForPage bool
SetPermissionForDirectory bool
SetPermissionForGlobals bool
SetPermissionForNamespace bool
SetPermissionForPage bool

Public Methods

Method Description
ClearEntriesForDirectory ( IFilesStorageProviderV30 provider, string directory ) : void

Clears all the ACL entries for a directory.

ClearEntriesForNamespace ( string nspace, List pages ) : void

Clears all the ACL entries for a namespace.

ClearEntriesForPage ( string page ) : void

Clears all the ACL entries for a page.

ProcessDirectoryRenaming ( IFilesStorageProviderV30 provider, string oldName, string newName ) : bool

Processes the renaming of a directory.

The method does not recurse in sub-directories.

ProcessNamespaceRenaming ( string oldName, List oldPages, string newName ) : bool

Processes the renaming of a namespace.

ProcessPageRenaming ( string oldName, string newName ) : bool

Processes the renaming of a page.

RemoveEntriesForDirectory ( UserGroup group, IFilesStorageProviderV30 provider, string directory ) : bool

Removes all the ACL Entries for a directory that are bound to a user group.

RemoveEntriesForDirectory ( UserInfo user, IFilesStorageProviderV30 provider, string directory ) : bool

Removes all the ACL Entries for a directory that are bound to a user.

RemoveEntriesForGlobals ( UserGroup group ) : bool

Removes all the ACL Entries for global resources that are bound to a user group.

RemoveEntriesForGlobals ( UserInfo user ) : bool

Removes all the ACL Entries for global resources that are bound to a user.

RemoveEntriesForNamespace ( UserGroup group, NamespaceInfo nspace ) : bool

Removes all the ACL Entries for a namespace that are bound to a user group.

RemoveEntriesForNamespace ( UserInfo user, NamespaceInfo nspace ) : bool

Removes all the ACL Entries for a namespace that are bound to a user.

RemoveEntriesForPage ( UserGroup group, PageInfo page ) : bool

Removes all the ACL Entries for a page that are bound to a user group.

RemoveEntriesForPage ( UserInfo user, PageInfo page ) : bool

Removes all the ACL Entries for a page that are bound to a user.

SetPermissionForDirectory ( AuthStatus status, IFilesStorageProviderV30 provider, string directory, string action, UserGroup group ) : bool

Sets a permission for a directory.

SetPermissionForDirectory ( AuthStatus status, IFilesStorageProviderV30 provider, string directory, string action, UserInfo user ) : bool

Sets a permission for a directory.

SetPermissionForGlobals ( AuthStatus status, string action, UserGroup group ) : bool

Sets a permission for a global resource.

SetPermissionForGlobals ( AuthStatus status, string action, UserInfo user ) : bool

Sets a permission for a global resource.

SetPermissionForNamespace ( AuthStatus status, NamespaceInfo nspace, string action, UserGroup group ) : bool

Sets a permission for a namespace.

SetPermissionForNamespace ( AuthStatus status, NamespaceInfo nspace, string action, UserInfo user ) : bool

Sets a permission for a namespace.

SetPermissionForPage ( AuthStatus status, PageInfo page, string action, UserGroup group ) : bool

Sets a permission for a page.

SetPermissionForPage ( AuthStatus status, PageInfo page, string action, UserInfo user ) : bool

Sets a permission for a page.

Private Methods

Method Description
GetLogMessage ( string resourcePrefix, string resource, string action, string subject, string status ) : string

Gets the log message for an ACL entry change.

RemoveEntriesForDirectory ( string subject, IFilesStorageProviderV30 provider, string directory ) : bool

Removes all the ACL Entries for a directory that are bound to a subject.

RemoveEntriesForGlobals ( string subject ) : bool

Removes all the ACL Entries for global resources that are bound to a subject.

RemoveEntriesForNamespace ( string subject, NamespaceInfo nspace ) : bool

Removes all the ACL Entries for a namespace that are bound to a subject.

RemoveEntriesForPage ( string subject, PageInfo page ) : bool

Removes all the ACL Entries for a page that are bound to a subject.

SetPermissionForDirectory ( AuthStatus status, IFilesStorageProviderV30 provider, string directory, string action, string subject ) : bool

Sets a permission for a directory.

SetPermissionForGlobals ( AuthStatus status, string action, string subject ) : bool

Sets a permission for a global resource.

SetPermissionForNamespace ( AuthStatus status, NamespaceInfo nspace, string action, string subject ) : bool

Sets a permission for a namespace.

SetPermissionForPage ( AuthStatus status, PageInfo page, string action, string subject ) : bool

Sets a permission for a page.

Method Details

ClearEntriesForDirectory() public static method

Clears all the ACL entries for a directory.
public static ClearEntriesForDirectory ( IFilesStorageProviderV30 provider, string directory ) : void
provider IFilesStorageProviderV30 The provider.
directory string The directory.
return void

ClearEntriesForNamespace() public static method

Clears all the ACL entries for a namespace.
public static ClearEntriesForNamespace ( string nspace, List pages ) : void
nspace string The namespace.
pages List The local names of the pages in the namespace.
return void

ClearEntriesForPage() public static method

Clears all the ACL entries for a page.
public static ClearEntriesForPage ( string page ) : void
page string The page full name.
return void

ProcessDirectoryRenaming() public static method

Processes the renaming of a directory.
The method does not recurse in sub-directories.
public static ProcessDirectoryRenaming ( IFilesStorageProviderV30 provider, string oldName, string newName ) : bool
provider IFilesStorageProviderV30 The provider.
oldName string The old directory name (full path).
newName string The new directory name (full path).
return bool

ProcessNamespaceRenaming() public static method

Processes the renaming of a namespace.
public static ProcessNamespaceRenaming ( string oldName, List oldPages, string newName ) : bool
oldName string The old name of the namespace.
oldPages List The list of local names of the pages in the renamed namespace.
newName string The new name of the namespace.
return bool

ProcessPageRenaming() public static method

Processes the renaming of a page.
public static ProcessPageRenaming ( string oldName, string newName ) : bool
oldName string The old full page name.
newName string The new full page name.
return bool

RemoveEntriesForDirectory() public static method

Removes all the ACL Entries for a directory that are bound to a user group.
public static RemoveEntriesForDirectory ( UserGroup group, IFilesStorageProviderV30 provider, string directory ) : bool
group UserGroup The group.
provider IFilesStorageProviderV30 The provider.
directory string The directory.
return bool

RemoveEntriesForDirectory() public static method

Removes all the ACL Entries for a directory that are bound to a user.
public static RemoveEntriesForDirectory ( UserInfo user, IFilesStorageProviderV30 provider, string directory ) : bool
user UserInfo The user.
provider IFilesStorageProviderV30 The provider.
directory string The directory.
return bool

RemoveEntriesForGlobals() public static method

Removes all the ACL Entries for global resources that are bound to a user group.
public static RemoveEntriesForGlobals ( UserGroup group ) : bool
group UserGroup The user group.
return bool

RemoveEntriesForGlobals() public static method

Removes all the ACL Entries for global resources that are bound to a user.
public static RemoveEntriesForGlobals ( UserInfo user ) : bool
user UserInfo The user.
return bool

RemoveEntriesForNamespace() public static method

Removes all the ACL Entries for a namespace that are bound to a user group.
public static RemoveEntriesForNamespace ( UserGroup group, NamespaceInfo nspace ) : bool
group UserGroup The user group.
nspace NamespaceInfo The namespace (null for the root).
return bool

RemoveEntriesForNamespace() public static method

Removes all the ACL Entries for a namespace that are bound to a user.
public static RemoveEntriesForNamespace ( UserInfo user, NamespaceInfo nspace ) : bool
user UserInfo The user.
nspace NamespaceInfo The namespace (null for the root).
return bool

RemoveEntriesForPage() public static method

Removes all the ACL Entries for a page that are bound to a user group.
public static RemoveEntriesForPage ( UserGroup group, PageInfo page ) : bool
group UserGroup The user group.
page PageInfo The page.
return bool

RemoveEntriesForPage() public static method

Removes all the ACL Entries for a page that are bound to a user.
public static RemoveEntriesForPage ( UserInfo user, PageInfo page ) : bool
user UserInfo The user.
page PageInfo The page.
return bool

SetPermissionForDirectory() public static method

Sets a permission for a directory.
public static SetPermissionForDirectory ( AuthStatus status, IFilesStorageProviderV30 provider, string directory, string action, UserGroup group ) : bool
status AuthStatus The authorization status.
provider IFilesStorageProviderV30 The provider that handles the directory.
directory string The directory.
action string The action of which to modify the authorization status.
group UserGroup The group subject of the authorization change.
return bool

SetPermissionForDirectory() public static method

Sets a permission for a directory.
public static SetPermissionForDirectory ( AuthStatus status, IFilesStorageProviderV30 provider, string directory, string action, UserInfo user ) : bool
status AuthStatus The authorization status.
provider IFilesStorageProviderV30 The provider that handles the directory.
directory string The directory.
action string The action of which to modify the authorization status.
user UserInfo The user subject of the authorization change.
return bool

SetPermissionForGlobals() public static method

Sets a permission for a global resource.
public static SetPermissionForGlobals ( AuthStatus status, string action, UserGroup group ) : bool
status AuthStatus The authorization status.
action string The action of which to modify the authorization status.
group UserGroup The group subject of the authorization change.
return bool

SetPermissionForGlobals() public static method

Sets a permission for a global resource.
public static SetPermissionForGlobals ( AuthStatus status, string action, UserInfo user ) : bool
status AuthStatus The authorization status.
action string The action of which to modify the authorization status.
user UserInfo The user subject of the authorization change.
return bool

SetPermissionForNamespace() public static method

Sets a permission for a namespace.
public static SetPermissionForNamespace ( AuthStatus status, NamespaceInfo nspace, string action, UserGroup group ) : bool
status AuthStatus The authorization status.
nspace NamespaceInfo The namespace (null for the root).
action string The action of which to modify the authorization status.
group UserGroup The group subject of the authorization change.
return bool

SetPermissionForNamespace() public static method

Sets a permission for a namespace.
public static SetPermissionForNamespace ( AuthStatus status, NamespaceInfo nspace, string action, UserInfo user ) : bool
status AuthStatus The authorization status.
nspace NamespaceInfo The namespace (null for the root).
action string The action of which to modify the authorization status.
user UserInfo The user subject of the authorization change.
return bool

SetPermissionForPage() public static method

Sets a permission for a page.
public static SetPermissionForPage ( AuthStatus status, PageInfo page, string action, UserGroup group ) : bool
status AuthStatus The authorization status.
page PageInfo The page.
action string The action of which to modify the authorization status.
group UserGroup The group subject of the authorization change.
return bool

SetPermissionForPage() public static method

Sets a permission for a page.
public static SetPermissionForPage ( AuthStatus status, PageInfo page, string action, UserInfo user ) : bool
status AuthStatus The authorization status.
page PageInfo The page.
action string The action of which to modify the authorization status.
user UserInfo The user subject of the authorization change.
return bool