mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 20:46:30 +00:00
consolidate CommonSecurity to Common.dll
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
namespace Azaion.Common.DTO;
|
||||
|
||||
public enum RoleEnum
|
||||
{
|
||||
None = 0,
|
||||
Operator = 10, //only annotator is available. Could send annotations to queue.
|
||||
Validator = 20, //annotator + dataset explorer. This role allows to receive annotations from the queue.
|
||||
CompanionPC = 30,
|
||||
Admin = 40, //
|
||||
ApiAdmin = 1000 //everything
|
||||
}
|
||||
|
||||
public static class RoleEnumExtensions
|
||||
{
|
||||
public static bool IsValidator(this RoleEnum role) =>
|
||||
role.In(RoleEnum.Validator, RoleEnum.Admin, RoleEnum.ApiAdmin);
|
||||
}
|
||||
Reference in New Issue
Block a user