File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Services/Object/classes/Translation Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class ilObjectTranslationGUI
36
36
public const CMD_SET_FALLBACK = "setFallback " ;
37
37
protected ilToolbarGUI $ toolbar ;
38
38
protected ilObjUser $ user ;
39
+ protected ilAccess $ access ;
39
40
protected ilLanguage $ lng ;
40
41
protected ilCtrl $ ctrl ;
41
42
protected ilGlobalTemplateInterface $ tpl ;
@@ -57,6 +58,7 @@ public function __construct($obj_gui)
57
58
58
59
$ this ->toolbar = $ DIC ->toolbar ();
59
60
$ this ->user = $ DIC ->user ();
61
+ $ this ->access = $ DIC ['ilAccess ' ];
60
62
$ this ->lng = $ DIC ->language ();
61
63
$ this ->ctrl = $ DIC ->ctrl ();
62
64
$ this ->tpl = $ DIC ["tpl " ];
@@ -182,6 +184,11 @@ public function executeCommand(): void
182
184
183
185
$ this ->ctrl ->getNextClass ($ this );
184
186
$ cmd = $ this ->ctrl ->getCmd (self ::CMD_LIST_TRANSLATIONS );
187
+ if (!$ this ->access ->checkAccess ('write ' , '' , $ this ->obj_gui ->getRefId ())) {
188
+ $ this ->tpl ->setOnScreenMessage ('failure ' , $ this ->lng ->txt ('no_permission ' ));
189
+ $ this ->ctrl ->redirect ($ this ->obj_gui );
190
+ }
191
+
185
192
if (in_array ($ cmd , $ commands )) {
186
193
$ this ->$ cmd ();
187
194
}
You can’t perform that action at this time.
0 commit comments