Disable menu button when user has no access right
Since rev c2b74d2ff7ed, the variable name does not contains the button name so the test for menu_buttons always fails. issue9528 review310221002
This commit is contained in:
1 parent
36ab2dd7a5
commit
41232df6bc
1 file changed
+6
-3
+6
-3
@@ -993,10 +993,10 @@
|
||||
['copy', access.create],
|
||||
['import', access.create],
|
||||
].forEach(function(e) {
|
||||
var button = e[0];
|
||||
var name = e[0];
|
||||
var access = e[1];
|
||||
if (this.buttons[button]) {
|
||||
this.buttons[button].toggleClass('disabled', !access);
|
||||
if (this.buttons[name]) {
|
||||
this.buttons[name].toggleClass('disabled', !access);
|
||||
}
|
||||
if (this.menu_buttons[name]) {
|
||||
this.menu_buttons[name]
|
||||
@@ -1320,6 +1320,9 @@
|
||||
}.bind(this));
|
||||
},
|
||||
import: function(){
|
||||
if (!Sao.common.MODELACCESS.get(this.screen.model_name).create) {
|
||||
return;
|
||||
}
|
||||
new Sao.Window.Import(this.title.text(), this.screen);
|
||||
},
|
||||
get_url: function() {
|
||||
|
||||
Reference in new issue
Block a user