Simplifies the change password logic with the back office so an admin user can easily change another user's password if they have access to the users section. Updates the controllers to populate the modelstate correctly, changes name of HasAppAccess to HasSectionAccess. Ensure we don't have duplicate ysod dialogs when there is an error.
This commit is contained in:
@@ -13,7 +13,13 @@ using Umbraco.Core.Services;
|
||||
namespace Umbraco.Core.Models
|
||||
{
|
||||
public static class UserExtensions
|
||||
{
|
||||
{
|
||||
public static bool HasSectionAccess(this IUser user, string app)
|
||||
{
|
||||
var apps = user.AllowedSections;
|
||||
return apps.Any(uApp => uApp.InvariantEquals(app));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to lookup the user's gravatar to see if the endpoint can be reached, if so it returns the valid URL
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user