File tree Expand file tree Collapse file tree 2 files changed +27
-0
lines changed
Expand file tree Collapse file tree 2 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import type { Schema } from '~types/user/current'
77
88import {
99 arrayOf ,
10+ isBoolean ,
1011 isNull ,
1112 isNumber ,
1213 isString ,
@@ -56,6 +57,16 @@ export const schema: Schema = {
5657 defaults : ( ) : string [ ] => [ ] ,
5758 readonly : true ,
5859 } ,
60+ 'isAdmin' : {
61+ accepts : isBoolean ,
62+ defaults : ( ) => false ,
63+ readonly : true ,
64+ } ,
65+ 'isManager' : {
66+ accepts : isBoolean ,
67+ defaults : ( ) => false ,
68+ readonly : true ,
69+ } ,
5970}
6071
6172export const description : ContextSchemaDescription < Schema > = {
@@ -115,6 +126,20 @@ export const description: ContextSchemaDescription<Schema> = {
115126 'ru-RU' : 'Символьные коды доступных пользователю разрешений' ,
116127 } ,
117128 } ,
129+ 'isAdmin' : {
130+ description : {
131+ 'en-GB' : 'Indicates whether the user has administrator privileges' ,
132+ 'es-ES' : 'Indica si el usuario tiene privilegios de administrador' ,
133+ 'ru-RU' : 'Указывает, имеет ли пользователь права администратора' ,
134+ } ,
135+ } ,
136+ 'isManager' : {
137+ description : {
138+ 'en-GB' : 'Indicates whether the user has manager privileges' ,
139+ 'es-ES' : 'Indica si el usuario tiene privilegios de gerente' ,
140+ 'ru-RU' : 'Указывает, имеет ли пользователь права менеджера' ,
141+ } ,
142+ } ,
118143}
119144
120145export const usage : ContextSchemaUsage = {
Original file line number Diff line number Diff line change @@ -9,4 +9,6 @@ export type Schema = {
99 'photo' : ReadonlyField < string | null > ;
1010 'groups' : ReadonlyField < string [ ] > ;
1111 'permissions' : ReadonlyField < string [ ] > ;
12+ 'isAdmin' : ReadonlyField < boolean > ;
13+ 'isManager' : ReadonlyField < boolean > ;
1214}
You can’t perform that action at this time.
0 commit comments