11import { createIntl } from '@edx/frontend-platform/i18n' ;
2+ import type { Role } from '@src/types' ;
23import { buildPermissionMatrixByResource } from './utils' ;
34
45const intl = createIntl ( { locale : 'en' , messages : { } } ) ;
@@ -14,15 +15,15 @@ const permissions = [
1415const resources = [
1516 { key : 'library' , label : 'Library' , description : '' } ,
1617] ;
17- const roles = [
18+ const roles : Role [ ] = [
1819 {
19- name : 'admin' , permissions : [ 'create_library' , 'edit_library' ] , userCount : 2 , role : 'admin' , description : '' , contextType : '' , scope : '' ,
20+ name : 'admin' , permissions : [ 'create_library' , 'edit_library' ] , userCount : 2 , role : 'admin' , description : '' , contextType : 'library ' , scope : '' ,
2021 } ,
2122 {
22- name : 'editor' , permissions : [ 'edit_library' ] , userCount : 2 , role : 'editor' , description : '' , contextType : '' , scope : '' ,
23+ name : 'editor' , permissions : [ 'edit_library' ] , userCount : 2 , role : 'editor' , description : '' , contextType : 'library ' , scope : '' ,
2324 } ,
2425 {
25- name : 'guest' , permissions : [ ] , userCount : 2 , role : 'guest' , description : '' , contextType : '' , scope : '' ,
26+ name : 'guest' , permissions : [ ] , userCount : 2 , role : 'guest' , description : '' , contextType : 'library ' , scope : '' ,
2627 } ,
2728] ;
2829
0 commit comments