View Source
Class UserServiceExtensions
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class UserServiceExtensions
Methods
View Source
GetAllPermissions(IUserService, IUser, String)
Declaration
public static EntityPermissionCollection GetAllPermissions(this IUserService userService, IUser user, string path)
Parameters
Returns
View Source
GetByKey(IUserService, Guid)
Declaration
public static IUser GetByKey(this IUserService userService, Guid key)
Parameters
Returns
View Source
GetPermissions(IUserService, IUser, String)
Declaration
public static EntityPermission GetPermissions(this IUserService userService, IUser user, string path)
Parameters
Returns
View Source
GetPermissions(IUserService, IUserGroup, Boolean, Int32[])
Get explicitly assigned permissions for a group and optional node Ids
Declaration
public static EntityPermissionCollection GetPermissions(this IUserService service, IUserGroup group, bool fallbackToDefaultPermissions, params int[] nodeIds)
Parameters
Type |
Name |
Description |
IUserService |
service |
|
IUserGroup |
group |
|
System.Boolean |
fallbackToDefaultPermissions |
Flag indicating if we want to include the default group permissions for each result if there are not explicit
permissions set
|
System.Int32[] |
nodeIds |
Specifying nothing will return all permissions for all nodes
|
Returns
View Source
GetPermissionsForPath(IUserService, IUserGroup, String, Boolean)
Gets the permissions for the provided group and path
Declaration
public static EntityPermissionSet GetPermissionsForPath(this IUserService service, IUserGroup group, string path, bool fallbackToDefaultPermissions = false)
Parameters
Type |
Name |
Description |
IUserService |
service |
|
IUserGroup |
group |
|
System.String |
path |
Path to check permissions for
|
System.Boolean |
fallbackToDefaultPermissions |
Flag indicating if we want to include the default group permissions for each result if there are not explicit
permissions set
|
Returns
View Source
GetProfilesById(IUserService, Int32[])
Declaration
public static IEnumerable<IProfile> GetProfilesById(this IUserService userService, params int[] ids)
Parameters
Type |
Name |
Description |
IUserService |
userService |
|
System.Int32[] |
ids |
|
Returns
View Source
RemoveUserGroupPermissions(IUserService, Int32)
Remove all permissions for this user group for all nodes
Declaration
public static void RemoveUserGroupPermissions(this IUserService userService, int groupId)
Parameters
Type |
Name |
Description |
IUserService |
userService |
|
System.Int32 |
groupId |
|
View Source
RemoveUserGroupPermissions(IUserService, Int32, Int32[])
Remove all permissions for this user group for all nodes specified
Declaration
public static void RemoveUserGroupPermissions(this IUserService userService, int groupId, params int[] entityIds)
Parameters
Type |
Name |
Description |
IUserService |
userService |
|
System.Int32 |
groupId |
|
System.Int32[] |
entityIds |
|