Fixed a few left overs of the old hasPermission check in the pluginmanager and softwareupdater
Fixed a few left overs from removing the groups and permissions enabled property
This commit is contained in:
1 parent
c0975ed15e
commit
785b0caaf2
6 files changed
+30
-64
No files matched your search
@@ -89,7 +89,7 @@ $(function() {
|
||||
self.settingsViewModel = parameters[1];
|
||||
self.printerState = parameters[2];
|
||||
self.systemViewModel = parameters[3];
|
||||
self.permissions = parameters[4];
|
||||
self.access = parameters[4];
|
||||
|
||||
self.config_repositoryUrl = ko.observable();
|
||||
self.config_repositoryTtl = ko.observable();
|
||||
@@ -378,7 +378,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.requestData = function(options) {
|
||||
if (!self.loginState.hasPermission(self.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.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.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.permissions.SETTINGS)) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -538,7 +538,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.uninstallPlugin = function(data) {
|
||||
if (!self.loginState.hasPermission(self.permissions.SETTINGS)) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -569,7 +569,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.refreshRepository = function() {
|
||||
if (!self.loginState.hasPermission(self.permissions.SETTINGS)) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
return;
|
||||
}
|
||||
self.requestData({refresh_repo: true});
|
||||
@@ -993,7 +993,7 @@ $(function() {
|
||||
};
|
||||
|
||||
self.onUserLoggedIn = function(user) {
|
||||
if (self.permissions.hasPermission(self.permissions.SETTINGS, user.permissions)) {
|
||||
if (self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
self.requestData({eval_notices: true});
|
||||
} else {
|
||||
self.onUserLoggedOut();
|
||||
@@ -1037,7 +1037,7 @@ $(function() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!self.loginState.hasPermission(self.permissions.SETTINGS)) {
|
||||
if (!self.loginState.hasPermission(self.access.permissions.SETTINGS)()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1197,7 +1197,7 @@ $(function() {
|
||||
// view model class, parameters for constructor, container to bind to
|
||||
ADDITIONAL_VIEWMODELS.push([
|
||||
PluginManagerViewModel,
|
||||
["loginStateViewModel", "settingsViewModel", "printerStateViewModel", "systemViewModel", "permissionsViewModel"],
|
||||
["loginStateViewModel", "settingsViewModel", "printerStateViewModel", "systemViewModel", "accessViewModel"],
|
||||
"#settings_plugin_pluginmanager"
|
||||
]);
|
||||
});
|
||||
Reference in new issue
Block a user