diff options
| author | ivar <i@oiee.no> | 2024-03-19 01:02:22 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2024-03-19 01:02:22 +0100 |
| commit | 5f604b3052dab1d51dc130df2470bf330b283ec6 (patch) | |
| tree | ae00e1fe4542850467555b4e3af41964ba8d878b /code/api/Enums/EUserRole.cs | |
| parent | 63cf177e8cf22e349534664d59a6926f8b36863d (diff) | |
| download | storage-5f604b3052dab1d51dc130df2470bf330b283ec6.tar.xz storage-5f604b3052dab1d51dc130df2470bf330b283ec6.zip | |
Max lenghts on db schema
Use latest temporal from cdn
Implement majority of translation functionality
Major refinements/bugs
Diffstat (limited to 'code/api/Enums/EUserRole.cs')
| -rw-r--r-- | code/api/Enums/EUserRole.cs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/code/api/Enums/EUserRole.cs b/code/api/Enums/EUserRole.cs deleted file mode 100644 index 75a81b3..0000000 --- a/code/api/Enums/EUserRole.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace I2R.Storage.Api.Enums; - -public enum EUserRole -{ - LEAST_PRIVILEGED = 0, - ADMIN = 1, -} - -public static class UserRole -{ - public static EUserRole FromString(string role) => role switch { - "least_privileged" => EUserRole.LEAST_PRIVILEGED, - "admin" => EUserRole.ADMIN, - _ => throw new ArgumentOutOfRangeException(nameof(role), role, null) - }; - - public static string ToString(EUserRole role) => role switch { - EUserRole.LEAST_PRIVILEGED => "least_privileged", - EUserRole.ADMIN => "admin", - _ => throw new ArgumentOutOfRangeException(nameof(role), role, null) - }; -}
\ No newline at end of file |
