removed unused ACL and fixed typos
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Jimenez Ruiz 2021-03-02 10:33:35 +01:00
parent 177ed24892
commit 97667595e5
5 changed files with 4 additions and 11 deletions

View File

@ -1,6 +1,7 @@
module.exports = function(Self) {
Self.remoteMethodCtx('getStarredModules', {
description: 'returns the starred modules for the current user',
accessType: 'READ',
returns: {
type: 'object',
root: true

View File

@ -1,6 +1,7 @@
module.exports = function(Self) {
Self.remoteMethodCtx('toggleStarredModule', {
description: 'creates or deletes a starred module for the current user',
accessType: 'WRITE',
returns: {
type: 'object',
root: true

View File

@ -31,13 +31,5 @@
"model": "Module",
"foreignKey": "moduleFk"
}
},
"acls": [
{
"accessType": "READ",
"principalType": "ROLE",
"principalId": "$everyone",
"permission": "ALLOW"
}
]
}
}

View File

@ -1,4 +1,3 @@
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
VALUES
('Module', '*', '*', 'ALLOW', 'ROLE', 'employee'),
('StarredModule', '*', '*', 'ALLOW', 'ROLE', 'employee');

View File

@ -16,7 +16,7 @@ describe('Salix Component vnHome', () => {
controller = $componentController('vnHome', {$element, $scope, $window});
}));
describe('getStarredMofules()', () => {
describe('getStarredModules()', () => {
it('should not set any of the modules as starred if there are no starred modules for the user', () => {
const expectedResponse = [];
controller._modules = [{module: 'client', name: 'Clients'}];