@@ -14,19 +14,20 @@ import { useQuerySettings } from '@src/authz-module/hooks/useQuerySettings';
1414import { useUserAssignedRoles } from '@src/authz-module/data/hooks' ;
1515import messages from './messages' ;
1616import { ViewAllPermissionsCell , ActionsCell , PermissionsCell } from './CustomCells' ;
17+ import UserPermissions from './UserPermissions' ;
1718
1819const dummyData = [
1920 {
20- role : 'Course Admin' ,
21- organization : 'edX ' ,
22- scope : 'Course: Demo Course ' ,
23- permissions : [ 'View' , 'Edit' , 'Delete '] ,
21+ role : 'Super Admin' ,
22+ organization : 'All organizations ' ,
23+ scope : 'Global ' ,
24+ permissions : [ 'Total access ' ] ,
2425 } ,
2526 {
26- role : 'Course Auditor ' ,
27- organization : 'edX ' ,
28- scope : 'Course: Demo Course 2 ' ,
29- permissions : [ 'View' , 'Edit '] ,
27+ role : 'Global Staff ' ,
28+ organization : 'All organizations ' ,
29+ scope : 'Global ' ,
30+ permissions : [ 'Partial access ' ] ,
3031 } ,
3132 {
3233 role : 'Course Admin' ,
@@ -35,25 +36,13 @@ const dummyData = [
3536 permissions : [ 'View' , 'Edit' , 'Delete' ] ,
3637 } ,
3738 {
38- role : 'Course Auditor' ,
39- organization : 'edX' ,
40- scope : 'Course: Demo Course 2' ,
41- permissions : [ 'View' , 'Edit' ] ,
42- } ,
43- {
44- role : 'Course Admin' ,
39+ role : 'Course Staff' ,
4540 organization : 'edX' ,
4641 scope : 'Course: Demo Course' ,
4742 permissions : [ 'View' , 'Edit' , 'Delete' ] ,
4843 } ,
4944 {
50- role : 'Course Auditor' ,
51- organization : 'edX' ,
52- scope : 'Course: Demo Course 2' ,
53- permissions : [ 'View' , 'Edit' ] ,
54- } ,
55- {
56- role : 'Course Admin' ,
45+ role : 'Course Editor' ,
5746 organization : 'edX' ,
5847 scope : 'Course: Demo Course' ,
5948 permissions : [ 'View' , 'Edit' , 'Delete' ] ,
@@ -64,38 +53,26 @@ const dummyData = [
6453 scope : 'Course: Demo Course 2' ,
6554 permissions : [ 'View' , 'Edit' ] ,
6655 } ,
67- {
68- role : 'Course Admin' ,
56+ {
57+ role : 'Library Admin' ,
6958 organization : 'edX' ,
7059 scope : 'Course: Demo Course' ,
7160 permissions : [ 'View' , 'Edit' , 'Delete' ] ,
7261 } ,
7362 {
74- role : 'Course Auditor ' ,
63+ role : 'Library Author ' ,
7564 organization : 'edX' ,
7665 scope : 'Course: Demo Course 2' ,
7766 permissions : [ 'View' , 'Edit' ] ,
7867 } ,
7968 {
80- role : 'Course Admin ' ,
69+ role : 'Library Contributor ' ,
8170 organization : 'edX' ,
8271 scope : 'Course: Demo Course' ,
8372 permissions : [ 'View' , 'Edit' , 'Delete' ] ,
8473 } ,
8574 {
86- role : 'Course Auditor' ,
87- organization : 'edX' ,
88- scope : 'Course: Demo Course 2' ,
89- permissions : [ 'View' , 'Edit' ] ,
90- } ,
91- {
92- role : 'Course Admin' ,
93- organization : 'edX' ,
94- scope : 'Course: Demo Course' ,
95- permissions : [ 'View' , 'Edit' , 'Delete' ] ,
96- } ,
97- {
98- role : 'Course Auditor' ,
75+ role : 'Library User' ,
9976 organization : 'edX' ,
10077 scope : 'Course: Demo Course 2' ,
10178 permissions : [ 'View' , 'Edit' ] ,
@@ -129,7 +106,7 @@ const AuditUserPage = () => {
129106 {
130107 id : 'action' ,
131108 Header : formatMessage ( messages [ 'authz.user.table.action.column.header' ] ) ,
132- Cell : ActionsCell ,
109+ Cell : ActionsCell , // call the new component from other PR to show the Info Icon when is required
133110 } ,
134111 ] ;
135112 const columns = [
@@ -186,6 +163,12 @@ const AuditUserPage = () => {
186163 initialState = { { pageSize : TABLE_DEFAULT_PAGE_SIZE } }
187164 additionalColumns = { additionalColumns }
188165 columns = { columns }
166+ isExpandable
167+ renderRowSubComponent = { ( { row } ) => (
168+ < div >
169+ < UserPermissions row = { row } />
170+ </ div >
171+ ) }
189172 >
190173 < DataTable . Table />
191174 < TableFooter />
0 commit comments