5468-account_privileges #1552
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1552
Loading…
Reference in New Issue
No description provided.
Delete Branch "5468-account_privileges"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -12,1 +12,4 @@
require('../methods/vn-user/privileges')(Self);
require('../methods/vn-user/createUser')(Self);
Self.definition.settings.acls.find(acl => acl.property == 'create').permission = 'DENY';
Si al final has pogut fer açò perque en lloc de crear un nou mètode
createUser
no fiques els permisos que nosaltres volem al natiu?Esq en les proves que vaig fer no funcionava bé, pero crec q era pq no tornava a fer el gulp. Pq ara ho he provat sí que funciona. Ho modifique.
@ -125,0 +124,4 @@
],
"scopes": {
"preview": {
"fields": ["id", "name", "username", "roleFk", "nickname", "lang", "active", "created", "updated", "image", "hasGrant", "realm", "email"]
Si la linia te mes de 80 caracters ficar les propietats una en cada linia.
@ -0,0 +3,4 @@
VALUES
('Role', '*', 'READ', 'ALLOW', 'ROLE', 'employee'),
('Role', '*', 'WRITE', 'ALLOW', 'ROLE', 'hr'),
('Role', '*', 'WRITE', 'ALLOW', 'ROLE', 'marketing');
hr i marketing no deuen de tindre permisos de escritura en
Role
.@ -0,0 +20,4 @@
Self.deleteMailAlias = async function(ctx, id) {
const models = Self.app.models;
const isAuthorized = await models.Worker.isAuthorized(ctx, id);
El modul
account
no deu de dependre de models de altres moduls:Worker
@ -9,1 +9,4 @@
require('../methods/account/set-password')(Self);
require('../methods/account/change-mail-forwarding')(Self);
require('../methods/account/add-mail-alias')(Self);
require('../methods/account/delete-mail-alias')(Self);
Perque has creat estos mètodes?
Per a cumplir estes restriccions:
Tras hablar con Juan, se decide que quitar esto. Y añadir los acls para itManagement
@ -5,0 +14,4 @@
get isHr() {
return this.aclService.hasAny(['hr']);
}
}
Para que se han implementado estos métodos en el controlador? Se utilizan?
@ -99,2 +95,3 @@
if (res.data)
if (res.data) {
this.businessId = res.data.businessFk;
console.log(this.businessId);
Has olvidado quitar el
console.log