Adjust the bundled Plugins to the new hasPermission functions
This commit is contained in:
1 parent
c3e430b472
commit
1c07974f6c
1 file changed
+8
-8
@@ -378,7 +378,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.requestData = function(options) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -402,7 +402,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.togglePlugin = function(data) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -462,7 +462,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.installFromRepository = function(data) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.installPlugin = function(url, name, reinstall, followDependencyLinks) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -536,7 +536,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.uninstallPlugin = function(data) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -567,7 +567,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.refreshRepository = function() {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
self.requestData({refresh_repo: true});
|
||||
@@ -1010,7 +1010,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.onUserLoggedIn = function(user) {
|
||||
if (self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
self.requestData({eval_notices: true});
|
||||
} else {
|
||||
self.onUserLoggedOut();
|
||||
@@ -1054,7 +1054,7 @@ $(function() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user