Interface IUserGroupPermissionService
Manages permissions for user group access.
Namespace: Umbraco.Cms.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public interface IUserGroupPermissionService
Methods
View SourceAuthorizeAccessAsync(IUser, Guid)
Authorize that a user belongs to a user group.
Declaration
virtual Task<UserGroupAuthorizationStatus> AuthorizeAccessAsync(IUser user, Guid userGroupKey)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
Guid | userGroupKey | The identifier of the user group to check for access. |
Returns
Type | Description |
---|---|
Task<UserGroupAuthorizationStatus> | A task resolving into a UserGroupAuthorizationStatus. |
AuthorizeAccessAsync(IUser, IEnumerable<Guid>)
Authorize that a user belongs to user groups.
Declaration
Task<UserGroupAuthorizationStatus> AuthorizeAccessAsync(IUser user, IEnumerable<Guid> userGroupKeys)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
IEnumerable<Guid> | userGroupKeys | The identifiers of the user groups to check for access. |
Returns
Type | Description |
---|---|
Task<UserGroupAuthorizationStatus> | A task resolving into a UserGroupAuthorizationStatus. |
AuthorizeCreateAsync(IUser, IUserGroup)
Authorize that a user is allowed to create a new user group.
Declaration
Task<UserGroupAuthorizationStatus> AuthorizeCreateAsync(IUser user, IUserGroup userGroup)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
IUserGroup | userGroup | The user group to be created. |
Returns
Type | Description |
---|---|
Task<UserGroupAuthorizationStatus> | A task resolving into a UserGroupAuthorizationStatus. |
AuthorizeUpdateAsync(IUser, IUserGroup)
Authorize that a user is allowed to update an existing user group.
Declaration
Task<UserGroupAuthorizationStatus> AuthorizeUpdateAsync(IUser user, IUserGroup userGroup)
Parameters
Type | Name | Description |
---|---|---|
IUser | user | IUser to authorize. |
IUserGroup | userGroup | The user group to be updated. |
Returns
Type | Description |
---|---|
Task<UserGroupAuthorizationStatus> | A task resolving into a UserGroupAuthorizationStatus. |