View Source
Class CurrentUserController
Controller to back the User.Resource service, used for fetching user data when already authenticated. user.service is currently used for handling authentication
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
[PluginController("UmbracoApi")]
public class CurrentUserController : UmbracoAuthorizedJsonController, IDiscoverable
Methods
View Source
GetPermissions(Int32[])
Returns permissions for all nodes passed in for the current user
Declaration
public Dictionary<int, string[]> GetPermissions(int[] nodeIds)
Parameters
Type |
Name |
Description |
System.Int32[] |
nodeIds |
|
Returns
Type |
Description |
System.Collections.Generic.Dictionary<System.Int32, System.String[]> |
|
View Source
GetUserTours()
Declaration
public IEnumerable<UserTourStatus> GetUserTours()
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<UserTourStatus> |
|
View Source
HasPermission(String, Int32)
Checks a nodes permission for the current user
Declaration
public bool HasPermission(string permissionToCheck, int nodeId)
Parameters
Type |
Name |
Description |
System.String |
permissionToCheck |
|
System.Int32 |
nodeId |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
PostChangePassword(ChangingPasswordModel)
Changes the users password
Declaration
public async Task<ModelWithNotifications<string>> PostChangePassword(ChangingPasswordModel data)
Parameters
Returns
Type |
Description |
System.Threading.Tasks.Task<ModelWithNotifications<System.String>> |
If the password is being reset it will return the newly reset password, otherwise will return an empty value
|
View Source
PostSetAvatar()
Declaration
public async Task<HttpResponseMessage> PostSetAvatar()
Returns
Type |
Description |
System.Threading.Tasks.Task<HttpResponseMessage> |
|
View Source
PostSetInvitedUserPassword(String)
When a user is invited and they click on the invitation link, they will be partially logged in
where they can set their username/password
Declaration
public async Task<UserDetail> PostSetInvitedUserPassword(string newPassword)
Parameters
Type |
Name |
Description |
System.String |
newPassword |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<UserDetail> |
|
View Source
PostSetUserTour(UserTourStatus)
Saves a tour status for the current user
Declaration
public IEnumerable<UserTourStatus> PostSetUserTour(UserTourStatus status)
Parameters
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<UserTourStatus> |
|