File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
ui/src/components/Setting Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -46,26 +46,23 @@ const updateSessionRecordingStatus = async (value: boolean) => {
4646const sessionRecordingStatus = computed ({
4747 get : () => store .getters [" sessionRecording/isEnabled" ],
4848 set : async (value : boolean ) => {
49- updateSessionRecordingStatus (value );
49+ await updateSessionRecordingStatus (value );
5050 },
5151});
5252
5353const hasAuthorization = computed (() => {
5454 const role = store .getters [" auth/role" ];
55- if (role !== " " ) {
56- return hasPermission (
57- authorizer .role [role ],
58- actions .namespace .enableSessionRecord ,
59- );
60- }
61- return false ;
55+ if (role === " " ) return false ;
56+
57+ return hasPermission (
58+ authorizer .role [role ],
59+ actions .namespace .enableSessionRecord ,
60+ );
6261});
6362
6463onMounted (async () => {
6564 try {
66- if (props .hasTenant ) {
67- await store .dispatch (" sessionRecording/getStatus" );
68- }
65+ if (props .hasTenant ) await store .dispatch (" sessionRecording/getStatus" );
6966 } catch (error : unknown ) {
7067 store .dispatch (" snackbar/showSnackbarErrorDefault" );
7168 handleError (error );
You can’t perform that action at this time.
0 commit comments