fixes #4074 Descargar ACL del usuario actual #1255

Open
pau wants to merge 40 commits from 4074-download-user-ACL into dev
Contributor
No description provided.
pau added 7 commits 2023-01-13 14:16:31 +00:00
pau changed title from 4074-download-user-ACL to WIP: 4074-download-user-ACL 2023-01-17 09:11:01 +00:00
pau added 1 commit 2023-01-23 10:30:08 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
838df9e85a
refs #4074 @4h acl model and methods in directive
pau added 1 commit 2023-01-23 10:31:05 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
1572f21901
Merge branch 'dev' into 4074-download-user-ACL
pau added 1 commit 2023-01-23 12:19:02 +00:00
pau added 1 commit 2023-01-23 13:42:47 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
baa7aa45b2
refs #4074 @2h new directive for the acls
pau requested review from juan 2023-01-23 13:56:59 +00:00
pau reviewed 2023-01-24 06:09:27 +00:00
@ -22,3 +22,3 @@
},
"defaultPriority": {
"type": "int"
"type": "number"
Author
Contributor

este cambio es debido que al ejecutar los test y gulp swagger daba un aviso de que habia algo definido como int en vez de number

este cambio es debido que al ejecutar los test y gulp swagger daba un aviso de que habia algo definido como int en vez de number
Owner

Ja s'ha acabat la tarea? Si no, ficar WIP: al títol.

Ja s'ha acabat la tarea? Si no, ficar `WIP:` al títol.
pau added 1 commit 2023-01-27 11:53:35 +00:00
gitea/salix/pipeline/head This commit looks good Details
2e4e0b12ab
fix front test not working
juan requested changes 2023-02-03 10:45:43 +00:00
@ -0,0 +29,4 @@
let ACLs = [];
for (let key in aclList) {
let acl = await models.acls.findOne({
Owner

Gastar modelo nativo ACL

Gastar modelo nativo ACL
pau marked this conversation as resolved
pau added 1 commit 2023-02-03 10:46:42 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
7a04818f3c
removed acls model since its native to loopback
pau added 1 commit 2023-02-03 10:51:00 +00:00
gitea/salix/pipeline/head This commit looks good Details
1ce5d781c5
remove console.log and acls form model-config
juan requested changes 2023-02-03 10:53:59 +00:00
@ -18,0 +23,4 @@
'accessType': '*',
'permission': 'ALLOW',
'principalType': 'ROLE',
'principalId': 'employee'
Owner

No hace falta comilla simple para los atributos

No hace falta comilla simple para los atributos
pau marked this conversation as resolved
@ -0,0 +18,4 @@
let model = acls[0].split('.')[0];
let property = acls[0].split('.')[1].split('/')[0];
let accessType = acls[0].split('.')[1].split('/')[1];
Owner

Para evitar repeticion hacer el split una vez

Para evitar repeticion hacer el split una vez
alexandre marked this conversation as resolved
@ -0,0 +51,4 @@
}
vnUserAcl.$inject = ['aclService'];
ngModule.directive('vnUserAcl', vnUserAcl);
Owner

Declarar las variables que se pueda como const

Declarar las variables que se pueda como const
alexandre marked this conversation as resolved
@ -14,0 +19,4 @@
'accessType': '*',
'permission': 'ALLOW',
'principalType': 'ROLE',
'principalId': 'employee'
Owner

No hace falta comilla simple para los atributos

No hace falta comilla simple para los atributos
alexandre marked this conversation as resolved
pau added 1 commit 2023-02-03 11:38:03 +00:00
gitea/salix/pipeline/head This commit looks good Details
a7ec8d6e69
requested changes
pau added 1 commit 2023-02-03 11:39:06 +00:00
gitea/salix/pipeline/head This commit looks good Details
d9cf194873
fix lets
pau requested review from juan 2023-02-13 11:33:47 +00:00
alexandre added 1 commit 2023-03-03 11:00:41 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
ee9fba212c
refs #4074 refactor user-acl
alexandre added 1 commit 2023-03-09 08:01:18 +00:00
alexandre added 1 commit 2023-03-09 08:12:02 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
ce6cb2ec13
refs #4074 quitadas comillas simples
alexandre added 1 commit 2023-03-09 08:47:29 +00:00
alexandre added 1 commit 2023-03-09 09:01:35 +00:00
gitea/salix/pipeline/head This commit looks good Details
4d74a3d690
refs #4074 deleted unused function
alexandre changed title from WIP: 4074-download-user-ACL to fixes #4074 Descargar ACL del usuario actual 2023-03-09 09:01:57 +00:00
alexandre changed title from fixes #4074 Descargar ACL del usuario actual to WIP: #4074 Descargar ACL del usuario actual 2023-03-27 05:37:17 +00:00
alexandre added 1 commit 2023-03-29 05:16:51 +00:00
alexandre added 1 commit 2023-04-04 06:50:54 +00:00
alexandre added 2 commits 2023-04-04 07:29:49 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
713eeddbcc
refs #4074 added $everyone access
alexandre added 1 commit 2023-04-04 07:31:00 +00:00
gitea/salix/pipeline/head This commit looks good Details
7b01998cfc
removed wrong sql
alexandre changed title from WIP: #4074 Descargar ACL del usuario actual to fixes #4074 Descargar ACL del usuario actual 2023-04-04 07:44:47 +00:00
alexandre added 1 commit 2023-04-04 07:45:34 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
2a0d597f63
Merge branch 'dev' into 4074-download-user-ACL
alexandre added 2 commits 2023-04-19 05:48:53 +00:00
alexandre added 1 commit 2023-04-19 07:07:42 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
827fc7bacd
refs #4074 vn-user refactored
alexandre changed title from fixes #4074 Descargar ACL del usuario actual to WIP: #4074 Descargar ACL del usuario actual 2023-04-19 07:16:35 +00:00
alexandre added 1 commit 2023-04-19 10:49:53 +00:00
gitea/salix/pipeline/head This commit looks good Details
fd21a03c01
refs #4074 fixing front tests
alexandre changed title from WIP: #4074 Descargar ACL del usuario actual to fixes #4074 Descargar ACL del usuario actual 2023-04-19 10:53:14 +00:00
alexandre changed title from fixes #4074 Descargar ACL del usuario actual to WIP: #4074 Descargar ACL del usuario actual 2023-04-21 05:12:03 +00:00
alexandre added 1 commit 2023-04-21 12:26:41 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
db3de2385d
refs #4074 get static and dynamic acls
alexandre changed title from WIP: #4074 Descargar ACL del usuario actual to fixes #4074 Descargar ACL del usuario actual 2023-05-04 12:39:43 +00:00
alexandre added 1 commit 2023-05-04 12:39:59 +00:00
gitea/salix/pipeline/head This commit looks good Details
ede35db638
Merge branch 'dev' into 4074-download-user-ACL
juan requested changes 2023-06-09 19:16:23 +00:00
@ -0,0 +46,4 @@
FROM salix.RoleMapping rm
JOIN account.role r ON r.id = rm.roleId
WHERE rm.principalId = ?
)`, [userId]);
Owner

Esta consulta pot ferse sense gastar SQL, sempre que es puga, fer-ho en funcions de loopback.

Esta consulta pot ferse sense gastar SQL, sempre que es puga, fer-ho en funcions de loopback.
alexandre marked this conversation as resolved
@ -0,0 +48,4 @@
if (elementToDisable)
elementToDisable.disabled = true;
} else
$element.remove();
Owner

Este bloc de codi esta duplicat de 'front/core/directives/acl.js', la part comú deuria de menejarse a una funció i cridarla desde les dos directives.

Este bloc de codi esta duplicat de 'front/core/directives/acl.js', la part comú deuria de menejarse a una funció i cridarla desde les dos directives.
Contributor

En quin fitxer deuria de posar ixa funció?

En quin fitxer deuria de posar ixa funció?
alexandre marked this conversation as resolved
@ -25,0 +50,4 @@
}
return false;
}
Owner

Podría abreviarse en:

hasAnyACL(model, property, accessType) {
    const acls = this.acls[model];
    if (acls)
    for (const prop of ['*', property]) {
        const acl = acls[prop];
        if (acl && (acl['*'] || acl[accessType]))
            return true;
    }
    return false;
}
Podría abreviarse en: ``` hasAnyACL(model, property, accessType) { const acls = this.acls[model]; if (acls) for (const prop of ['*', property]) { const acl = acls[prop]; if (acl && (acl['*'] || acl[accessType])) return true; } return false; } ```
alexandre marked this conversation as resolved
alexandre added 1 commit 2023-06-12 05:48:51 +00:00
alexandre added 1 commit 2023-06-12 06:49:26 +00:00
gitea/salix/pipeline/head This commit looks good Details
01daa253db
refs #4074 minor fixes
alexandre added 1 commit 2023-06-16 05:41:05 +00:00
alexandre added 1 commit 2023-06-16 06:56:49 +00:00
gitea/salix/pipeline/head This commit looks good Details
83434219ac
refs #4074 refactor acl-common
alexandre requested review from juan 2023-06-16 06:57:00 +00:00
juan approved these changes 2023-06-21 07:35:28 +00:00
Dismissed
jsegarra added 1 commit 2023-12-22 09:46:49 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
61ab29ead3
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 4074-download-user-ACL
jsegarra dismissed juan’s review 2023-12-22 09:46:49 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jsegarra reviewed 2024-04-30 08:17:53 +00:00
@ -0,0 +13,4 @@
const staticAcls = new Map();
const app = require('vn-loopback/server/server');
app.on('started', function() {
Member

No se si esta linea deberia ir porque schemaInfo tiene el mismo formato y no tiene el evento started

No se si esta linea deberia ir porque schemaInfo tiene el mismo formato y no tiene el evento started
jsegarra added 2 commits 2024-05-02 08:03:27 +00:00
This pull request has changes conflicting with the target branch.
  • back/models/vn-user.js
  • back/models/vn-user.json
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1255
No description provided.