Innovenergy_trunk/csharp/app/API/DataModel/User.Extensions.cs

8 lines
375 B
C#

namespace InnovEnergy.API.DataModel;
public static class UserExtensions
{
public static Boolean CanEditUsers(this User user) => user.UserType == UserType.Admin;
public static Boolean CanEditFolders(this User user) => user.UserType != UserType.Viewer;
public static Boolean CanEditInstallations(this User user) => user.UserType != UserType.Viewer;
}