Merge branch '2079-acl_update_ticket_weekly' of verdnatura/salix into dev
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat Exposito 2020-02-13 07:39:17 +00:00 committed by Gitea
commit e1bb3649de
3 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,3 @@
INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId)
VALUES ('TicketWeekly', '*', 'WRITE', 'ALLOW', 'ROLE', 'buyer');
UPDATE salix.ACL SET accessType = 'READ' WHERE (id = '91');

View File

@ -8,7 +8,7 @@ describe('Ticket descriptor path', () => {
beforeAll(async() => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('employee', 'ticket');
await page.loginAndModule('buyer', 'ticket');
await page.accessToSection('ticket.weekly.index');
});

View File

@ -7,7 +7,11 @@ class Controller extends Component {
this.aclService = aclService;
this.$httpParamSerializer = $httpParamSerializer;
this.moreOptions = [
{name: 'Add turn', callback: this.showAddTurnDialog},
{
name: 'Add turn',
acl: 'buyer',
callback: this.showAddTurnDialog
},
{name: 'Show Delivery Note', callback: this.showDeliveryNote},
{name: 'Send Delivery Note', callback: this.confirmDeliveryNote},
{name: 'Delete ticket', callback: this.showDeleteTicketDialog},