Click or drag to resize

PermissionsClear Method

Remove all permissions of the user
It will not save the change in the database unless you explicitly call the Save method.

Namespace:  AskiaPortalCmn.Common
Assembly:  AskiaPortalCmn (in AskiaPortalCmn.dll) Version: 1.7.0-build068
Syntax
public IReturnValue Clear()

Return Value

Type: IReturnValue
It return unsuccess value, if the user in the context doesn't have enough permission to do this action

Implements

IPermissionsClear
Remarks
If at least one condition is not allowed to be changed by the user in the context, nothing will be remove.
The user in the context must have all of his own permission equal or higher than the permission of the user to modify.
It will not save the change in the database unless you explicitly call the Save method.
Examples

Case 1.

The UserA in the context have the following permissions:
- users : Create and edit
- groups : Create and edit

The UserB (the user to edit) have the following permissions:
- users : Full control
- groups: Read only

The method will return failed value because the `users` permission item UserB is higher than the permission of the UserA

Case 2.

The UserA in the context have the following permissions:
- users : Create and edit
- groups : Create and edit

The UserB (the user to edit) have the following permissions:
- users : Read only
- groups: Read only

The method will return success value because the all permissions item UserB is lower than the permissions of the UserA

See Also