SFJS 0.3.51
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
class SNPrivileges extends SFItem {
|
||||
|
||||
setCredentialsForAction(action, credentials) {
|
||||
this.content.desktopPrivileges[action] = credentials;
|
||||
}
|
||||
|
||||
getCredentialsForAction(action) {
|
||||
return this.content.desktopPrivileges[action] || [];
|
||||
}
|
||||
|
||||
toggleCredentialForAction(action, credential) {
|
||||
if(this.isCredentialRequiredForAction(action, credential)) {
|
||||
this.removeCredentialForAction(action, credential);
|
||||
} else {
|
||||
this.addCredentialForAction(action, credential);
|
||||
}
|
||||
}
|
||||
|
||||
removeCredentialForAction(action, credential) {
|
||||
_.pull(this.content.desktopPrivileges[action], credential);
|
||||
}
|
||||
|
||||
addCredentialForAction(action, credential) {
|
||||
var credentials = this.getCredentialsForAction(action);
|
||||
credentials.push(credential);
|
||||
this.setCredentialsForAction(action, credentials);
|
||||
}
|
||||
|
||||
isCredentialRequiredForAction(action, credential) {
|
||||
var credentialsRequired = this.getCredentialsForAction(action);
|
||||
return credentialsRequired.includes(credential);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ SFModelManager.ContentTypeClassMapping = {
|
||||
"SN|Component" : SNComponent,
|
||||
"SF|Extension" : SNServerExtension,
|
||||
"SF|MFA" : SNMfa,
|
||||
"SN|Privileges" : SNPrivileges
|
||||
"SN|Privileges" : SFPrivileges
|
||||
};
|
||||
|
||||
SFItem.AppDomain = "org.standardnotes.sn";
|
||||
|
||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "standard-notes-web",
|
||||
"version": "3.0.5",
|
||||
"version": "3.0.6",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
@@ -4830,9 +4830,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"standard-file-js": {
|
||||
"version": "0.3.50",
|
||||
"resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.50.tgz",
|
||||
"integrity": "sha512-vvdOS6xsMYid0H8nKV4dtHKEpmGXXZgwtCwLiO2P1BvegYWu0PepnroqTj4dUMm6QXwCtm1PfaaKzfV+GWVPTw==",
|
||||
"version": "0.3.51",
|
||||
"resolved": "https://registry.npmjs.org/standard-file-js/-/standard-file-js-0.3.51.tgz",
|
||||
"integrity": "sha512-wBNsYTQ3vztb+psbETi1DwpeYq3QMiheztla7zKvn9PV+qmJfg4RLJXLVFysF9232Nf1YpZBMpUJ3wkdrY4FSA==",
|
||||
"dev": true
|
||||
},
|
||||
"statuses": {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"serve-static": "^1.13.2",
|
||||
"sn-models": "0.1.14",
|
||||
"sn-stylekit": "2.0.13",
|
||||
"standard-file-js": "0.3.50",
|
||||
"standard-file-js": "0.3.51",
|
||||
"grunt-shell": "^2.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user