Troubleshoot, fix

This commit is contained in:
Stephan
2018-03-16 09:06:44 +01:00
parent 3637e1e5af
commit dda696bde5
89 changed files with 721 additions and 781 deletions

View File

@@ -37,10 +37,10 @@ namespace Umbraco.Core.Models
/// <summary>
/// Determines whether this user belongs to the administrators group.
/// </summary>
/// <remarks>The 'super' user does not automatically belongs to the administrators group.</remarks>
public static bool IsAdmin(this IUser user)
{
if (user == null) throw new ArgumentNullException(nameof(user));
// fixme should super always be admin?
return user.Groups != null && user.Groups.Any(x => x.Alias == Constants.Security.AdminGroupAlias);
}