Browse Source

fix: 修复会话录像播放权限

pull/7888/head
Jiangjie.Bai 3 years ago committed by Jiangjie.Bai
parent
commit
30556023d1
  1. 2
      apps/terminal/api/session.py
  2. 14
      utils/clean_db_content_types.py

2
apps/terminal/api/session.py

@ -64,7 +64,7 @@ class SessionViewSet(OrgBulkModelViewSet):
]
extra_filter_backends = [DatetimeRangeFilter]
rbac_perms = {
'download': ['terminal.download_sessionreplay']
'download': ['terminal.download_sessionreplay|terminal.view_sessionreplay']
}
@staticmethod

14
utils/clean_db_content_types.py

@ -33,6 +33,20 @@ def clean_db_content_types():
('perms', 'applicationpermission', 'connect_myapps'),
('perms', 'applicationpermission', 'view_userapps'),
('perms', 'applicationpermission', 'view_usergroupapps'),
('perms', 'databaseapppermission', 'view_databaseapppermission'),
('perms', 'databaseapppermission', 'add_databaseapppermission'),
('perms', 'databaseapppermission', 'change_databaseapppermission'),
('perms', 'databaseapppermission', 'delete_databaseapppermission'),
('perms', 'k8sapppermission', 'view_k8sapppermission'),
('perms', 'k8sapppermission', 'add_k8sapppermission'),
('perms', 'k8sapppermission', 'change_k8sapppermission'),
('perms', 'k8sapppermission', 'delete_k8sapppermission'),
('perms', 'remoteapppermission', 'view_remoteapppermission'),
('perms', 'remoteapppermission', 'add_remoteapppermission'),
('perms', 'remoteapppermission', 'change_remoteapppermission'),
('perms', 'remoteapppermission', 'delete_remoteapppermission'),
('perms', 'permeddatabaseapp', 'connect_mydatabaseapp'),

Loading…
Cancel
Save