File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -290,7 +290,7 @@ export class Group extends TimeStamps implements Base {
290290
291291 const allRoles = member . roles ;
292292 const allRolesPermission = allRoles . map ( ( roleName ) => {
293- const p = group . roles . find ( ( r ) => r . name === roleName ) ;
293+ const p = group . roles . find ( ( r ) => String ( r . _id ) === roleName ) ;
294294
295295 return p ?. permissions ?? [ ] ;
296296 } ) ;
Original file line number Diff line number Diff line change @@ -897,6 +897,7 @@ class GroupService extends TcService {
897897 )
898898 . exec ( ) ;
899899
900+ this . cleanGroupInfoCache ( groupId ) ;
900901 const json = await this . notifyGroupInfoUpdate ( ctx , group ) ;
901902 return json ;
902903 }
@@ -936,6 +937,7 @@ class GroupService extends TcService {
936937 )
937938 . exec ( ) ;
938939
940+ this . cleanGroupInfoCache ( groupId ) ;
939941 const json = await this . notifyGroupInfoUpdate ( ctx , group ) ;
940942 return json ;
941943 }
@@ -968,6 +970,7 @@ class GroupService extends TcService {
968970 roleName
969971 ) ;
970972
973+ this . cleanGroupInfoCache ( groupId ) ;
971974 const json = await this . notifyGroupInfoUpdate ( ctx , group ) ;
972975 return json ;
973976 }
@@ -1000,6 +1003,8 @@ class GroupService extends TcService {
10001003 permissions
10011004 ) ;
10021005
1006+ this . cleanGroupInfoCache ( groupId ) ;
1007+ this . cleanGroupAllUserPermissionCache ( groupId ) ;
10031008 const json = await this . notifyGroupInfoUpdate ( ctx , group ) ;
10041009 return json ;
10051010 }
You can’t perform that action at this time.
0 commit comments