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

8 lines
375 B
C#
Raw Normal View History

2023-02-16 12:57:06 +00:00
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;
}