diff --git a/back/methods/vn-user/update-user.js b/back/methods/vn-user/update-user.js
index ddaae8548e..202b01c654 100644
--- a/back/methods/vn-user/update-user.js
+++ b/back/methods/vn-user/update-user.js
@@ -24,6 +24,10 @@ module.exports = Self => {
arg: 'lang',
type: 'string',
description: 'The user lang'
+ }, {
+ arg: 'twoFactor',
+ type: 'string',
+ description: 'The user twoFactor'
}
],
http: {
@@ -32,8 +36,8 @@ module.exports = Self => {
}
});
- Self.updateUser = async(ctx, id, name, nickname, email, lang) => {
+ Self.updateUser = async(ctx, id, name, nickname, email, lang, twoFactor) => {
await Self.userSecurity(ctx, id);
- await Self.upsertWithWhere({id}, {name, nickname, email, lang});
+ await Self.upsertWithWhere({id}, {name, nickname, email, lang, twoFactor});
};
};
diff --git a/back/models/vn-user.js b/back/models/vn-user.js
index 6ec5642a29..531561e04f 100644
--- a/back/models/vn-user.js
+++ b/back/models/vn-user.js
@@ -101,9 +101,10 @@ module.exports = function(Self) {
const headers = httpRequest.headers;
const origin = headers.origin;
- const defaultHash = '/reset-password?access_token=$token$';
+ const defaultHash = '!/reset-password?access_token=$token$';
const recoverHashes = {
- hedera: 'verificationToken=$token$'
+ hedera: '!verificationToken=$token$',
+ lilium: '/resetPassword?access_token=$token$'
};
const app = info.options?.app;
@@ -115,7 +116,7 @@ module.exports = function(Self) {
const params = {
recipient: info.email,
lang: user.lang,
- url: origin + '/#!' + recoverHash
+ url: origin + '/#' + recoverHash
};
const options = Object.assign({}, info.options);
diff --git a/back/process.yml b/back/process.yml
index 08fee7a933..94072b57d9 100644
--- a/back/process.yml
+++ b/back/process.yml
@@ -3,4 +3,5 @@ apps:
name: salix-back
instances: 1
max_restarts: 0
+ autorestart: false
node_args: --tls-min-v1.0 --openssl-legacy-provider
diff --git a/db/routines/salix/triggers/ACL_afterDelete.sql b/db/routines/salix/triggers/ACL_afterDelete.sql
index 18689dfb03..b7e6071fc2 100644
--- a/db/routines/salix/triggers/ACL_afterDelete.sql
+++ b/db/routines/salix/triggers/ACL_afterDelete.sql
@@ -3,7 +3,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `salix`.`ACL_afterDelete`
AFTER DELETE ON `ACL`
FOR EACH ROW
BEGIN
- INSERT INTO ACL
+ INSERT INTO ACLLog
SET `action` = 'delete',
`changedModel` = 'Acl',
`changedModelId` = OLD.id,
diff --git a/db/routines/vn/procedures/client_userDisable.sql b/db/routines/vn/procedures/client_userDisable.sql
index f2ba65c1cd..779ffd6881 100644
--- a/db/routines/vn/procedures/client_userDisable.sql
+++ b/db/routines/vn/procedures/client_userDisable.sql
@@ -21,6 +21,7 @@ BEGIN
AND a.id IS NULL
AND u.active
AND c.created < util.VN_CURDATE() - INTERVAL vMonths MONTH
+ AND NOT u.role = (SELECT id FROM `role` WHERE name = 'supplier')
AND u.id NOT IN (
SELECT DISTINCT c.id
FROM client c
diff --git a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql
index c359c7c8d3..26e661d9a9 100644
--- a/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql
+++ b/db/routines/vn/procedures/itemShelvingSale_addBySectorCollection.sql
@@ -12,7 +12,7 @@ BEGIN
DECLARE vSaleFk INT;
DECLARE vSectorFk INT;
DECLARE vSales CURSOR FOR
- SELECT s.id
+ SELECT DISTINCT s.id
FROM sectorCollectionSaleGroup sc
JOIN saleGroupDetail sg ON sg.saleGroupFk = sc.saleGroupFk
JOIN sale s ON sg.saleFk = s.id
diff --git a/db/routines/vn/triggers/host_beforeInsert.sql b/db/routines/vn/triggers/host_beforeInsert.sql
new file mode 100644
index 0000000000..c2cb823343
--- /dev/null
+++ b/db/routines/vn/triggers/host_beforeInsert.sql
@@ -0,0 +1,8 @@
+DELIMITER $$
+CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeInsert`
+ BEFORE INSERT ON `host`
+ FOR EACH ROW
+BEGIN
+ SET NEW.editorFk = account.myUser_getId();
+END$$
+DELIMITER ;
diff --git a/db/routines/vn/triggers/host_beforeUpdate.sql b/db/routines/vn/triggers/host_beforeUpdate.sql
index 0b0962e860..dc5a18f3c3 100644
--- a/db/routines/vn/triggers/host_beforeUpdate.sql
+++ b/db/routines/vn/triggers/host_beforeUpdate.sql
@@ -4,5 +4,6 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`host_beforeUpdate`
FOR EACH ROW
BEGIN
SET new.updated = util.VN_NOW();
+ SET NEW.editorFk = account.myUser_getId();
END$$
DELIMITER ;
diff --git a/db/versions/11185-maroonArborvitae/00-firstScript.sql b/db/versions/11185-maroonArborvitae/00-firstScript.sql
new file mode 100644
index 0000000000..b07126e713
--- /dev/null
+++ b/db/versions/11185-maroonArborvitae/00-firstScript.sql
@@ -0,0 +1 @@
+DROP TABLE bi.Greuges_comercial_detail;
\ No newline at end of file
diff --git a/db/versions/11187-yellowErica/00-firstScript.sql b/db/versions/11187-yellowErica/00-firstScript.sql
new file mode 100644
index 0000000000..fb75b1f2fa
--- /dev/null
+++ b/db/versions/11187-yellowErica/00-firstScript.sql
@@ -0,0 +1 @@
+ALTER TABLE vn.host ADD editorFk int(10) unsigned DEFAULT NULL NULL;
diff --git a/db/versions/11189-purplePaniculata/00-firstScript.sql b/db/versions/11189-purplePaniculata/00-firstScript.sql
new file mode 100644
index 0000000000..3319bd154f
--- /dev/null
+++ b/db/versions/11189-purplePaniculata/00-firstScript.sql
@@ -0,0 +1,3 @@
+ALTER TABLE vn.item
+ ADD CONSTRAINT item_itemPackingType_FK FOREIGN KEY (itemPackingTypeFk)
+ REFERENCES vn.itemPackingType(code) ON DELETE RESTRICT ON UPDATE CASCADE;
diff --git a/db/versions/11190-blueLaurel/00-firstScript.sql b/db/versions/11190-blueLaurel/00-firstScript.sql
new file mode 100644
index 0000000000..75e3f8e595
--- /dev/null
+++ b/db/versions/11190-blueLaurel/00-firstScript.sql
@@ -0,0 +1,9 @@
+ALTER TABLE hedera.tpvMerchantEnable
+ DROP FOREIGN KEY tpvMerchantEnable_ibfk_1,
+ DROP PRIMARY KEY,
+ ADD CONSTRAINT tpvMerchantEnable_pk PRIMARY KEY (merchantFk),
+ ADD CONSTRAINT tpvMerchantEnable_tpvMerchant_FK
+ FOREIGN KEY (merchantFk)
+ REFERENCES hedera.tpvMerchant(id)
+ ON DELETE RESTRICT
+ ON UPDATE CASCADE;
diff --git a/e2e/paths/14-account/01_create_and_basic_data.spec.js b/e2e/paths/14-account/01_create_and_basic_data.spec.js
deleted file mode 100644
index e2c069d800..0000000000
--- a/e2e/paths/14-account/01_create_and_basic_data.spec.js
+++ /dev/null
@@ -1,164 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account create and basic data path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('itManagement', 'account');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should open the new account form by clicking the add button', async() => {
- await page.waitToClick(selectors.accountIndex.addAccount);
- await page.waitForState('account.create');
- });
-
- it('should fill the form and then save it by clicking the create button', async() => {
- await page.write(selectors.accountIndex.newName, 'remy');
- await page.write(selectors.accountIndex.newNickname, 'Gambit');
- await page.write(selectors.accountIndex.newEmail, 'RemyEtienneLeBeau@verdnatura.es');
- await page.autocompleteSearch(selectors.accountIndex.newRole, 'Trainee');
- await page.write(selectors.accountIndex.newPassword, 'cestlavie');
- await page.waitToClick(selectors.accountIndex.createAccountButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should redirect the user to the created account basic data section', async() => {
- await page.waitForState('account.card.basicData');
- });
-
- it('should check the name is as expected', async() => {
- const result = await page.waitToGetProperty(selectors.accountBasicData.name, 'value');
-
- expect(result).toEqual('remy');
- });
-
- it('should check the nickname is as expected', async() => {
- const result = await page.waitToGetProperty(selectors.accountBasicData.nickname, 'value');
-
- expect(result).toEqual('Gambit');
- });
-
- it('should check the email is as expected', async() => {
- const result = await page.waitToGetProperty(selectors.accountBasicData.email, 'value');
-
- expect(result).toEqual('RemyEtienneLeBeau@verdnatura.es');
- });
-
- it('should navigate to the roles section to check the roles are correct', async() => {
- await page.accessToSection('account.card.roles');
- const rolesCount = await page.countElement(selectors.accountRoles.anyResult);
-
- expect(rolesCount).toEqual(3);
- });
-
- describe('Descriptor option', () => {
- describe('activate account', () => {
- it(`should check the active account icon isn't present in the descriptor`, async() => {
- await page.waitForNumberOfElements(selectors.accountDescriptor.activeAccountIcon, 0);
- });
-
- it('should activate the account using the descriptor menu', async() => {
- await page.waitToClick(selectors.accountDescriptor.menuButton);
- await page.waitToClick(selectors.accountDescriptor.activateAccount);
- await page.waitToClick(selectors.accountDescriptor.acceptButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Account enabled!');
- });
-
- it('should check the active account icon is now present in the descriptor', async() => {
- await page.waitForSelector(selectors.accountDescriptor.activeAccountIcon, {visible: false});
- });
- });
-
- describe('deactivate user', () => {
- it(`should check the inactive user icon isn't present in the descriptor just yet`, async() => {
- await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
- });
-
- it('should deactivate the user using the descriptor menu', async() => {
- await page.waitToClick(selectors.accountDescriptor.menuButton);
- await page.waitToClick(selectors.accountDescriptor.deactivateUser);
- await page.waitToClick(selectors.accountDescriptor.acceptButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('User deactivated!');
- });
-
- it('should check the inactive user icon is now present', async() => {
- await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 1);
- });
- });
-
- describe('activate user', () => {
- it('should activate the user using the descriptor menu', async() => {
- await page.waitToClick(selectors.accountDescriptor.menuButton);
- await page.waitToClick(selectors.accountDescriptor.activateUser);
- await page.waitToClick(selectors.accountDescriptor.acceptButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('User activated!');
- });
-
- it('should check the inactive user icon is not present anymore', async() => {
- await page.waitForNumberOfElements(selectors.accountDescriptor.activeUserIcon, 0);
- });
- });
-
- describe('mail forwarding', () => {
- it('should activate the mail forwarding and set the recipent email', async() => {
- await page.accessToSection('account.card.mailForwarding');
- await page.waitToClick(selectors.accountMailForwarding.mailForwardingCheckbox);
- await page.write(selectors.accountMailForwarding.email, 'someEmail@someDomain.es');
- await page.waitToClick(selectors.accountMailForwarding.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
- });
-
- describe('Set password', () => {
- it('should set the password using the descriptor menu', async() => {
- const newPassword = 'quantum.12345';
-
- await page.waitToClick(selectors.accountDescriptor.menuButton);
- await page.waitToClick(selectors.accountDescriptor.setPassword);
- await page.write(selectors.accountDescriptor.newPassword, newPassword);
- await page.write(selectors.accountDescriptor.repeatPassword, newPassword);
- await page.waitToClick(selectors.accountDescriptor.acceptButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Password changed succesfully!');
- });
-
- // cant log into created account for unknown reasons
- // it('should login into the created account with the new password', async() => {
- // await page.loginAndModule('Remy', 'quantum.crypt0graphy');
- // });
- });
-
- describe('delete account', () => {
- // it('should navigate to the account basic data section', async() => {
- // });
-
- it('should delete the account using the descriptor menu', async() => {
- await page.waitToClick(selectors.accountDescriptor.menuButton);
- await page.waitToClick(selectors.accountDescriptor.deleteAccount);
- await page.waitToClick(selectors.accountDescriptor.acceptButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('User removed');
- });
- });
- });
-});
diff --git a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js b/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js
deleted file mode 100644
index 840fb8afee..0000000000
--- a/e2e/paths/14-account/02_alias_create_and_basic_data.spec.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account Alias create and basic data path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('itManagement', 'account');
- await page.accessToSection('account.alias');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should open the new account alias form by clicking the add button', async() => {
- await page.waitToClick(selectors.accountAliasIndex.addAlias);
- await page.waitForState('account.alias.create');
- });
-
- it('should fill the form and then save it by clicking the create alias button', async() => {
- await page.write(selectors.accountAliasIndex.newName, 'Boring alias');
- await page.write(selectors.accountAliasIndex.newDescription, 'Boring description');
- await page.waitToClick(selectors.accountAliasIndex.createAliasButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should redirect the user to the created account alias basic data section', async() => {
- await page.waitForState('account.alias.card.basicData');
- });
-
- it('should edit the alias basic data', async() => {
- await page.overwrite(selectors.accountAliasBasicData.name, 'Psykers');
- await page.overwrite(selectors.accountAliasBasicData.description, 'Email group for psykers');
- await page.waitToClick(selectors.accountAliasBasicData.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should reload the basicData section and check the name was edited successfully', async() => {
- await page.reloadSection('account.alias.card.basicData');
- const result = await page.waitToGetProperty(selectors.accountAliasBasicData.name, 'value');
-
- expect(result).toEqual('Psykers');
- });
-
- it('should check the alias description was edited successfully', async() => {
- const result = await page.waitToGetProperty(selectors.accountAliasBasicData.description, 'value');
-
- expect(result).toContain('psykers');
- });
-
- it('should search IT alias then access the user section to check the role listed is the expected one', async() => {
- await page.accessToSearchResult('IT');
- await page.accessToSection('account.alias.card.users');
- const rolesCount = await page.countElement(selectors.accountAliasUsers.anyResult);
-
- expect(rolesCount).toEqual(1);
- });
-});
diff --git a/e2e/paths/14-account/03_role_create_and_basic_data.spec.js b/e2e/paths/14-account/03_role_create_and_basic_data.spec.js
deleted file mode 100644
index 6acf823188..0000000000
--- a/e2e/paths/14-account/03_role_create_and_basic_data.spec.js
+++ /dev/null
@@ -1,86 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account Role create and basic data path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('it', 'account');
- await page.accessToSection('account.role');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should open the new account role form by clicking the add button', async() => {
- await page.waitToClick(selectors.accountRoleIndex.addRole);
- await page.waitForState('account.role.create');
- });
-
- it('should fill the form and then save it by clicking the create role button', async() => {
- await page.write(selectors.accountRoleIndex.newName, 'boringRole');
- await page.write(selectors.accountRoleIndex.newDescription, 'Boring description');
- await page.waitToClick(selectors.accountRoleIndex.createRoleButton);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should redirect the user to the created role basic data section', async() => {
- await page.waitForState('account.role.card.basicData');
- });
-
- it('should edit the role basic data', async() => {
- await page.overwrite(selectors.accountRoleBasicData.name, 'psyker');
- await page.overwrite(selectors.accountRoleBasicData.description, 'A role just for psykers');
- await page.waitToClick(selectors.accountRoleBasicData.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should reload the role basicData section and check the name was edited successfully', async() => {
- await page.reloadSection('account.role.card.basicData');
- const result = await page.waitToGetProperty(selectors.accountRoleBasicData.name, 'value');
-
- expect(result).toEqual('psyker');
- });
-
- it('should check the role description was edited successfully', async() => {
- const result = await page.waitToGetProperty(selectors.accountRoleBasicData.description, 'value');
-
- expect(result).toContain('psykers');
- });
-
- it('should navigate to the subroles section', async() => {
- await page.accessToSection('account.role.card.subroles');
- });
-
- it('should asign a subrole', async() => {
- await page.waitToClick(selectors.accountSubroles.addSubrole);
- await page.autocompleteSearch(selectors.accountSubroles.role, 'teamManager');
- await page.waitToClick(selectors.accountSubroles.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Role added!');
- });
-
- it('should reload the subroles section and check a role was added', async() => {
- await page.reloadSection('account.role.card.subroles');
- const subrolesCount = await page.countElement(selectors.accountSubroles.anyResult);
-
- expect(subrolesCount).toEqual(1);
- });
-
- it('should access the employee roles inheritance then check the roles listed are the expected ones', async() => {
- await page.accessToSearchResult('employee');
- await page.accessToSection('account.role.card.inherited');
- const rolesCount = await page.countElement(selectors.accountRoleInheritance.anyResult);
-
- expect(rolesCount).toEqual(7);
- });
-});
diff --git a/e2e/paths/14-account/04_acl.spec.js b/e2e/paths/14-account/04_acl.spec.js
deleted file mode 100644
index ce2a63b14f..0000000000
--- a/e2e/paths/14-account/04_acl.spec.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account ACL path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('developer', 'account');
- await page.accessToSection('account.acl');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should go to create new acl', async() => {
- await page.waitToClick(selectors.accountAcl.addAcl);
- await page.waitForState('account.acl.create');
- });
-
- it('should create new acl', async() => {
- await page.autocompleteSearch(selectors.accountAcl.role, 'sysadmin');
- await page.autocompleteSearch(selectors.accountAcl.model, 'Account');
- await page.autocompleteSearch(selectors.accountAcl.accessType, '*');
- await page.autocompleteSearch(selectors.accountAcl.permission, 'ALLOW');
- await page.waitToClick(selectors.accountAcl.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should navigate to edit', async() => {
- await page.doSearch();
- await page.waitToClick(selectors.accountAcl.thirdAcl);
- await page.waitForState('account.acl.edit');
- });
-
- it('should edit the third acl', async() => {
- await page.autocompleteSearch(selectors.accountAcl.model, 'Supplier');
- await page.autocompleteSearch(selectors.accountAcl.accessType, 'READ');
- await page.waitToClick(selectors.accountAcl.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should delete the third result', async() => {
- const result = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText');
- await page.waitToClick(selectors.accountAcl.deleteThirdAcl);
- await page.waitToClick(selectors.globalItems.acceptButton);
- const message = await page.waitForSnackbar();
- const newResult = await page.waitToGetProperty(selectors.accountAcl.thirdAcl, 'innerText');
-
- expect(message.text).toContain('ACL removed');
- expect(result).not.toEqual(newResult);
- });
-});
diff --git a/e2e/paths/14-account/05_connections.spec.js b/e2e/paths/14-account/05_connections.spec.js
deleted file mode 100644
index 49d5f612d2..0000000000
--- a/e2e/paths/14-account/05_connections.spec.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account Connections path', () => {
- let browser;
- let page;
- const account = 'sysadmin';
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule(account, 'account');
- await page.accessToSection('account.connections');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should check this is the last connection', async() => {
- const firstResult = await page.waitToGetProperty(selectors.accountConnections.firstConnection, 'innerText');
-
- expect(firstResult).toContain(account);
- });
-});
diff --git a/e2e/paths/14-account/06_accounts.spec.js b/e2e/paths/14-account/06_accounts.spec.js
deleted file mode 100644
index 8bd6ea7d5f..0000000000
--- a/e2e/paths/14-account/06_accounts.spec.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account Accounts path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('sysadmin', 'account');
- await page.accessToSection('account.accounts');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should sync roles', async() => {
- await page.waitToClick(selectors.accountAccounts.syncRoles);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Roles synchronized!');
- });
-
- it('should relogin', async() => {
- await page.loginAndModule('sysadmin', 'account');
- await page.accessToSection('account.accounts');
- });
-
- it('should sync all', async() => {
- await page.waitToClick(selectors.accountAccounts.syncAll);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Synchronizing in the background');
- });
-});
diff --git a/e2e/paths/14-account/07_ldap.spec.js b/e2e/paths/14-account/07_ldap.spec.js
deleted file mode 100644
index eb22f695c1..0000000000
--- a/e2e/paths/14-account/07_ldap.spec.js
+++ /dev/null
@@ -1,41 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account LDAP path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('sysadmin', 'account');
- await page.accessToSection('account.ldap');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should set data and save', async() => {
- await page.waitToClick(selectors.accountLdap.checkEnable);
- await page.write(selectors.accountLdap.server, '1234');
- await page.write(selectors.accountLdap.rdn, '1234');
- await page.write(selectors.accountLdap.password, 'nightmare');
- await page.write(selectors.accountLdap.userDn, 'sysadmin');
- await page.write(selectors.accountLdap.groupDn, '1234');
- await page.waitToClick(selectors.accountLdap.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should reset data', async() => {
- await page.waitToClick(selectors.accountLdap.checkEnable);
- await page.waitToClick(selectors.accountLdap.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-});
diff --git a/e2e/paths/14-account/08_samba.spec.js b/e2e/paths/14-account/08_samba.spec.js
deleted file mode 100644
index a92344acb8..0000000000
--- a/e2e/paths/14-account/08_samba.spec.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account Samba path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('sysadmin', 'account');
- await page.accessToSection('account.samba');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- it('should set data and save', async() => {
- await page.waitToClick(selectors.accountSamba.checkEnable);
- await page.write(selectors.accountSamba.adDomain, '1234');
- await page.write(selectors.accountSamba.adController, '1234');
- await page.write(selectors.accountSamba.adUser, 'sysadmin');
- await page.write(selectors.accountSamba.adPassword, 'nightmare');
- await page.write(selectors.accountSamba.userDn, 'testDn');
- await page.waitToClick(selectors.accountSamba.verifyCert);
- await page.waitToClick(selectors.accountSamba.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-
- it('should reset data', async() => {
- await page.waitToClick(selectors.accountSamba.checkEnable);
- await page.waitToClick(selectors.accountSamba.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain('Data saved!');
- });
-});
diff --git a/e2e/paths/14-account/09_privileges.spec.js b/e2e/paths/14-account/09_privileges.spec.js
deleted file mode 100644
index e4b8fb24c4..0000000000
--- a/e2e/paths/14-account/09_privileges.spec.js
+++ /dev/null
@@ -1,112 +0,0 @@
-import selectors from '../../helpers/selectors.js';
-import getBrowser from '../../helpers/puppeteer';
-
-describe('Account privileges path', () => {
- let browser;
- let page;
-
- beforeAll(async() => {
- browser = await getBrowser();
- page = browser.page;
- await page.loginAndModule('developer', 'account');
- await page.accessToSearchResult('1101');
- await page.accessToSection('account.card.privileges');
- });
-
- afterAll(async() => {
- await browser.close();
- });
-
- describe('as developer', () => {
- it('should throw error when give privileges', async() => {
- await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
- await page.waitToClick(selectors.accountPrivileges.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain(`You don't have grant privilege`);
- });
-
- it('should throw error when change role', async() => {
- await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee');
- await page.waitToClick(selectors.accountPrivileges.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain(`You don't have grant privilege`);
- });
- });
-
- describe('as sysadmin', () => {
- beforeAll(async() => {
- await page.loginAndModule('sysadmin', 'account');
- await page.accessToSearchResult('9');
- await page.accessToSection('account.card.privileges');
- });
-
- it('should give privileges', async() => {
- await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
- await page.waitToClick(selectors.accountPrivileges.save);
- const message = await page.waitForSnackbar();
-
- await page.reloadSection('account.card.privileges');
- const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant);
-
- expect(message.text).toContain(`Data saved!`);
- expect(result).toBe('checked');
- });
-
- it('should throw error when change role and not own role', async() => {
- await page.autocompleteSearch(selectors.accountPrivileges.role, 'itBoss');
- await page.waitToClick(selectors.accountPrivileges.save);
-
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain(`You don't own the role and you can't assign it to another user`);
- });
-
- it('should change role to employee', async() => {
- await page.autocompleteSearch(selectors.accountPrivileges.role, 'employee');
- await page.waitToClick(selectors.accountPrivileges.save);
- const message = await page.waitForSnackbar();
-
- await page.reloadSection('account.card.privileges');
- const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value');
-
- expect(message.text).toContain(`Data saved!`);
- expect(result).toContain('employee');
- });
-
- it('should return role to developer', async() => {
- await page.autocompleteSearch(selectors.accountPrivileges.role, 'developer');
- await page.waitToClick(selectors.accountPrivileges.save);
- const message = await page.waitForSnackbar();
-
- await page.reloadSection('account.card.privileges');
- const result = await page.waitToGetProperty(selectors.accountPrivileges.role, 'value');
-
- expect(message.text).toContain(`Data saved!`);
- expect(result).toContain('developer');
- });
- });
-
- describe('as developer again', () => {
- it('should remove privileges', async() => {
- await page.accessToSearchResult('9');
- await page.accessToSection('account.card.privileges');
-
- await page.waitToClick(selectors.accountPrivileges.checkHasGrant);
- await page.waitToClick(selectors.accountPrivileges.save);
- const message = await page.waitForSnackbar();
-
- expect(message.text).toContain(`Data saved!`);
- });
-
- it('should logIn in developer', async() => {
- await page.reloadSection('account.card.privileges');
- const result = await page.checkboxState(selectors.accountPrivileges.checkHasGrant);
-
- expect(result).toBe('unchecked');
- });
- });
-});
diff --git a/front/salix/components/user-popover/index.html b/front/salix/components/user-popover/index.html
index 06a4af1e0c..cedb3383ba 100644
--- a/front/salix/components/user-popover/index.html
+++ b/front/salix/components/user-popover/index.html
@@ -38,7 +38,7 @@
My account
diff --git a/front/salix/components/user-popover/index.js b/front/salix/components/user-popover/index.js
index 1d88137fff..72cb734e96 100644
--- a/front/salix/components/user-popover/index.js
+++ b/front/salix/components/user-popover/index.js
@@ -82,6 +82,9 @@ class Controller {
? {id: $search}
: {bank: {like: '%' + $search + '%'}};
}
+ async redirect(id) {
+ window.location.href = await this.vnConfig.vnApp.getUrl(`worker/${id}`);
+ }
}
Controller.$inject = ['$scope', '$translate', 'vnConfig', 'vnAuth', 'vnToken'];
diff --git a/modules/account/front/accounts/index.html b/modules/account/front/accounts/index.html
deleted file mode 100644
index 6847e68d11..0000000000
--- a/modules/account/front/accounts/index.html
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
diff --git a/modules/account/front/accounts/index.js b/modules/account/front/accounts/index.js
deleted file mode 100644
index ab19126a1b..0000000000
--- a/modules/account/front/accounts/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onSynchronizeAll() {
- this.vnApp.showSuccess(this.$t('Synchronizing in the background'));
- this.$http.patch(`Accounts/syncAll`);
- }
-
- onSynchronizeRoles() {
- this.$http.patch(`RoleInherits/sync`)
- .then(() => this.vnApp.showSuccess(this.$t('Roles synchronized!')));
- }
-}
-
-ngModule.component('vnAccountAccounts', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/accounts/locale/es.yml b/modules/account/front/accounts/locale/es.yml
deleted file mode 100644
index 614ade3eb0..0000000000
--- a/modules/account/front/accounts/locale/es.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-Accounts: Cuentas
-Homedir base: Directorio base para carpetas de usuario
-Shell: Intérprete de línea de comandos
-User and role base id: Id base usuarios y roles
-Synchronize all: Sincronizar todo
-Synchronize roles: Sincronizar roles
-If password is not specified, just user attributes are synchronized: >-
- Si la contraseña no se especifica solo se sincronizarán lo atributos del usuario
-Synchronizing in the background: Sincronizando en segundo plano
-Users synchronized!: ¡Usuarios sincronizados!
-Username: Nombre de usuario
-Synchronize: Sincronizar
-Please enter the username: Por favor introduce el nombre de usuario
-Roles synchronized!: ¡Roles sincronizados!
diff --git a/modules/account/front/acl/create/index.html b/modules/account/front/acl/create/index.html
deleted file mode 100644
index 14332f737a..0000000000
--- a/modules/account/front/acl/create/index.html
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-
diff --git a/modules/account/front/acl/create/index.js b/modules/account/front/acl/create/index.js
deleted file mode 100644
index fea71991f1..0000000000
--- a/modules/account/front/acl/create/index.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- constructor(...args) {
- super(...args);
- this.accessTypes = [
- {name: '*'},
- {name: 'READ'},
- {name: 'WRITE'}
- ];
- this.permissions = [
- {name: 'ALLOW'},
- {name: 'DENY'}
- ];
-
- this.models = [];
- for (let model in window.validations)
- this.models.push({name: model});
-
- this.acl = {
- property: '*',
- principalType: 'ROLE',
- accessType: 'READ',
- permission: 'ALLOW'
- };
- }
-}
-
-ngModule.component('vnAclCreate', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/acl/index.js b/modules/account/front/acl/index.js
deleted file mode 100644
index 8393859a5a..0000000000
--- a/modules/account/front/acl/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import './main';
-import './index/';
-import './create';
-import './search-panel';
diff --git a/modules/account/front/acl/index/index.html b/modules/account/front/acl/index/index.html
deleted file mode 100644
index af06ec481d..0000000000
--- a/modules/account/front/acl/index/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
-
-
-
- {{::row.model}}.{{::row.property}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/acl/index/index.js b/modules/account/front/acl/index/index.js
deleted file mode 100644
index a2aec534af..0000000000
--- a/modules/account/front/acl/index/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onDelete(row) {
- return this.$http.delete(`ACLs/${row.id}`)
- .then(() => this.$.model.refresh())
- .then(() => this.vnApp.showSuccess(this.$t('ACL removed')));
- }
-}
-
-ngModule.component('vnAclIndex', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/acl/index/locale/es.yml b/modules/account/front/acl/index/locale/es.yml
deleted file mode 100644
index 8024f804c3..0000000000
--- a/modules/account/front/acl/index/locale/es.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-New ACL: Nuevo ACL
-Edit ACL: Editar ACL
-ACL will be removed: El ACL será eliminado
-ACL removed: ACL eliminado
diff --git a/modules/account/front/acl/locale/es.yml b/modules/account/front/acl/locale/es.yml
deleted file mode 100644
index ff6a1b41c3..0000000000
--- a/modules/account/front/acl/locale/es.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-Model: Modelo
-Property: Propiedad
-Access type: Tipo de acceso
-Permission: Permiso
\ No newline at end of file
diff --git a/modules/account/front/acl/main/index.html b/modules/account/front/acl/main/index.html
deleted file mode 100644
index 7767768d94..0000000000
--- a/modules/account/front/acl/main/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/acl/main/index.js b/modules/account/front/acl/main/index.js
deleted file mode 100644
index a91a71cb7c..0000000000
--- a/modules/account/front/acl/main/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import ngModule from '../../module';
-import ModuleMain from 'salix/components/module-main';
-
-export default class ACL extends ModuleMain {
- exprBuilder(param, value) {
- switch (param) {
- case 'search':
- return {model: {like: `%${value}%`}};
- default:
- return {[param]: value};
- }
- }
-}
-
-ngModule.vnComponent('vnAclComponent', {
- controller: ACL,
- template: require('./index.html')
-});
diff --git a/modules/account/front/acl/search-panel/index.html b/modules/account/front/acl/search-panel/index.html
deleted file mode 100644
index a3efab440d..0000000000
--- a/modules/account/front/acl/search-panel/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
diff --git a/modules/account/front/acl/search-panel/index.js b/modules/account/front/acl/search-panel/index.js
deleted file mode 100644
index 4f571059ef..0000000000
--- a/modules/account/front/acl/search-panel/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import ngModule from '../../module';
-import SearchPanel from 'core/components/searchbar/search-panel';
-
-export default class Controller extends SearchPanel {
- constructor(...args) {
- super(...args);
- this.accessTypes = [
- {name: '*'},
- {name: 'READ'},
- {name: 'WRITE'}
- ];
- this.permissions = [
- {name: 'ALLOW'},
- {name: 'DENY'}
- ];
-
- this.models = [];
- for (let model in window.validations)
- this.models.push({name: model});
- }
-}
-
-ngModule.component('vnAclSearchPanel', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/alias/basic-data/index.html b/modules/account/front/alias/basic-data/index.html
deleted file mode 100644
index 523c9297a1..0000000000
--- a/modules/account/front/alias/basic-data/index.html
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/alias/basic-data/index.js b/modules/account/front/alias/basic-data/index.js
deleted file mode 100644
index b7c2db0892..0000000000
--- a/modules/account/front/alias/basic-data/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {}
-
-ngModule.component('vnAliasBasicData', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- alias: '<'
- }
-});
diff --git a/modules/account/front/alias/card/index.html b/modules/account/front/alias/card/index.html
deleted file mode 100644
index 712147a249..0000000000
--- a/modules/account/front/alias/card/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/modules/account/front/alias/card/index.js b/modules/account/front/alias/card/index.js
deleted file mode 100644
index fd1a18f6ab..0000000000
--- a/modules/account/front/alias/card/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../../module';
-import ModuleCard from 'salix/components/module-card';
-
-class Controller extends ModuleCard {
- reload() {
- this.$http.get(`MailAliases/${this.$params.id}`)
- .then(res => this.alias = res.data);
- }
-}
-
-ngModule.vnComponent('vnAliasCard', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/alias/create/index.html b/modules/account/front/alias/create/index.html
deleted file mode 100644
index 4dad1b8705..0000000000
--- a/modules/account/front/alias/create/index.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
diff --git a/modules/account/front/alias/create/index.js b/modules/account/front/alias/create/index.js
deleted file mode 100644
index c058c3adf4..0000000000
--- a/modules/account/front/alias/create/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onSubmit() {
- return this.$.watcher.submit().then(res =>
- this.$state.go('account.alias.card.basicData', {id: res.data.id})
- );
- }
-}
-
-ngModule.component('vnAliasCreate', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/alias/descriptor/index.html b/modules/account/front/alias/descriptor/index.html
deleted file mode 100644
index 71b98c6a32..0000000000
--- a/modules/account/front/alias/descriptor/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- Delete
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/alias/descriptor/index.js b/modules/account/front/alias/descriptor/index.js
deleted file mode 100644
index a21baae5a2..0000000000
--- a/modules/account/front/alias/descriptor/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import ngModule from '../../module';
-import Descriptor from 'salix/components/descriptor';
-
-class Controller extends Descriptor {
- get alias() {
- return this.entity;
- }
-
- set alias(value) {
- this.entity = value;
- }
-
- onDelete() {
- return this.$http.delete(`MailAliases/${this.id}`)
- .then(() => this.$state.go('account.alias'))
- .then(() => this.vnApp.showSuccess(this.$t('Alias removed')));
- }
-}
-
-ngModule.component('vnAliasDescriptor', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- alias: '<'
- }
-});
diff --git a/modules/account/front/alias/descriptor/locale/es.yml b/modules/account/front/alias/descriptor/locale/es.yml
deleted file mode 100644
index 9c6fa0e733..0000000000
--- a/modules/account/front/alias/descriptor/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-Alias will be removed: El alias será eliminado
-Alias removed: Alias eliminado
\ No newline at end of file
diff --git a/modules/account/front/alias/index.js b/modules/account/front/alias/index.js
deleted file mode 100644
index 8eed3a3d3d..0000000000
--- a/modules/account/front/alias/index.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import './main';
-import './index/';
-import './create';
-import './summary';
-import './card';
-import './descriptor';
-import './create';
-import './basic-data';
-import './users';
diff --git a/modules/account/front/alias/index/index.html b/modules/account/front/alias/index/index.html
deleted file mode 100644
index 7343cb9bdf..0000000000
--- a/modules/account/front/alias/index/index.html
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
- {{::alias.alias}}
- {{::alias.description}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/alias/index/index.js b/modules/account/front/alias/index/index.js
deleted file mode 100644
index 44e146fb4a..0000000000
--- a/modules/account/front/alias/index/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- preview(alias) {
- this.selectedAlias = alias;
- this.$.summary.show();
- }
-}
-
-ngModule.component('vnAliasIndex', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/alias/index/locale/es.yml b/modules/account/front/alias/index/locale/es.yml
deleted file mode 100644
index 4df41c0bee..0000000000
--- a/modules/account/front/alias/index/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-New alias: Nuevo alias
-View alias: Ver alias
\ No newline at end of file
diff --git a/modules/account/front/alias/locale/es.yml b/modules/account/front/alias/locale/es.yml
deleted file mode 100644
index ecc856fcf6..0000000000
--- a/modules/account/front/alias/locale/es.yml
+++ /dev/null
@@ -1 +0,0 @@
-Public: Público
\ No newline at end of file
diff --git a/modules/account/front/alias/main/index.html b/modules/account/front/alias/main/index.html
deleted file mode 100644
index 43f6e2f510..0000000000
--- a/modules/account/front/alias/main/index.html
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/alias/main/index.js b/modules/account/front/alias/main/index.js
deleted file mode 100644
index 21eed3d853..0000000000
--- a/modules/account/front/alias/main/index.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import ngModule from '../../module';
-import ModuleMain from 'salix/components/module-main';
-
-export default class Alias extends ModuleMain {
- exprBuilder(param, value) {
- switch (param) {
- case 'search':
- return /^\d+$/.test(value)
- ? {id: value}
- : {alias: {like: `%${value}%`}};
- }
- }
-}
-
-ngModule.vnComponent('vnAlias', {
- controller: Alias,
- template: require('./index.html')
-});
diff --git a/modules/account/front/alias/summary/index.html b/modules/account/front/alias/summary/index.html
deleted file mode 100644
index 52ee2813d1..0000000000
--- a/modules/account/front/alias/summary/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
-
- {{summary.alias}}
-
-
- Basic data
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/alias/summary/index.js b/modules/account/front/alias/summary/index.js
deleted file mode 100644
index 21bc8d9ba7..0000000000
--- a/modules/account/front/alias/summary/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import ngModule from '../../module';
-import Component from 'core/lib/component';
-
-class Controller extends Component {
- set alias(value) {
- this._alias = value;
- this.$.summary = null;
- if (!value) return;
-
- this.$http.get(`MailAliases/${value.id}`)
- .then(res => this.$.summary = res.data);
- }
-
- get alias() {
- return this._alias;
- }
-}
-
-ngModule.component('vnAliasSummary', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- alias: '<'
- }
-});
diff --git a/modules/account/front/alias/users/index.html b/modules/account/front/alias/users/index.html
deleted file mode 100644
index 048a702eaa..0000000000
--- a/modules/account/front/alias/users/index.html
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
-
-
- {{::row.user.name}}
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/alias/users/index.js b/modules/account/front/alias/users/index.js
deleted file mode 100644
index b2446d71bd..0000000000
--- a/modules/account/front/alias/users/index.js
+++ /dev/null
@@ -1,31 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- let filter = {
- include: {
- relation: 'user',
- scope: {
- fields: ['id', 'name']
- }
- }
- };
- this.$http.get(`MailAliases/${this.$params.id}/accounts`, {filter})
- .then(res => this.$.data = res.data);
- }
-
- onRemove(row) {
- return this.$http.delete(`MailAliases/${this.$params.id}/accounts/${row.id}`)
- .then(() => {
- let index = this.$.data.indexOf(row);
- if (index !== -1) this.$.data.splice(index, 1);
- this.vnApp.showSuccess(this.$t('User removed'));
- });
- }
-}
-
-ngModule.component('vnAliasUsers', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/alias/users/index.spec.js b/modules/account/front/alias/users/index.spec.js
deleted file mode 100644
index d618f1de12..0000000000
--- a/modules/account/front/alias/users/index.spec.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import './index';
-
-describe('component vnAliasUsers', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnAliasUsers', {$element: null});
- controller.$params.id = 1;
- }));
-
- describe('$onInit()', () => {
- it('should delete entity and go to index', () => {
- $httpBackend.expectGET('MailAliases/1/accounts').respond('foo');
- controller.$onInit();
- $httpBackend.flush();
-
- expect(controller.$.data).toBe('foo');
- });
- });
-
- describe('onRemove()', () => {
- it('should call backend method to change role', () => {
- jest.spyOn(controller.vnApp, 'showSuccess');
-
- controller.$.data = [
- {id: 1, alias: 'foo'},
- {id: 2, alias: 'bar'}
- ];
-
- $httpBackend.expectDELETE('MailAliases/1/accounts/1').respond();
- controller.onRemove(controller.$.data[0]);
- $httpBackend.flush();
-
- expect(controller.$.data).toEqual([{id: 2, alias: 'bar'}]);
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-});
diff --git a/modules/account/front/alias/users/locale/es.yml b/modules/account/front/alias/users/locale/es.yml
deleted file mode 100644
index dc24eb318b..0000000000
--- a/modules/account/front/alias/users/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-User will be removed from alias: El usuario será borrado del alias
-User removed: Usuario borrado
\ No newline at end of file
diff --git a/modules/account/front/aliases/index.html b/modules/account/front/aliases/index.html
deleted file mode 100644
index 4a73ec873a..0000000000
--- a/modules/account/front/aliases/index.html
+++ /dev/null
@@ -1,64 +0,0 @@
-
-
-
-
-
-
-
- {{::row.alias.alias}}
-
-
- {{::row.alias.description}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Account not enabled
-
diff --git a/modules/account/front/aliases/index.js b/modules/account/front/aliases/index.js
deleted file mode 100644
index 0fc806a719..0000000000
--- a/modules/account/front/aliases/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- this.refresh();
- }
-
- refresh() {
- let filter = {
- where: {account: this.$params.id},
- include: {
- relation: 'alias',
- scope: {
- fields: ['id', 'alias', 'description']
- }
- }
- };
- return this.$http.get(`MailAliasAccounts`, {filter})
- .then(res => this.$.data = res.data);
- }
-
- onAddClick() {
- this.addData = {account: this.$params.id};
- this.$.dialog.show();
- }
-
- onAddSave() {
- return this.$http.post(`MailAliasAccounts`, this.addData)
- .then(() => this.refresh())
- .then(() => this.vnApp.showSuccess(
- this.$t('Subscribed to alias!'))
- );
- }
-
- onRemove(row) {
- return this.$http.delete(`MailAliasAccounts/${row.id}`)
- .then(() => {
- this.$.data.splice(this.$.data.indexOf(row), 1);
- this.vnApp.showSuccess(this.$t('Unsubscribed from alias!'));
- });
- }
-}
-
-ngModule.component('vnUserAliases', {
- template: require('./index.html'),
- controller: Controller,
- require: {
- card: '^vnUserCard'
- }
-});
diff --git a/modules/account/front/aliases/index.spec.js b/modules/account/front/aliases/index.spec.js
deleted file mode 100644
index 466f1e1e94..0000000000
--- a/modules/account/front/aliases/index.spec.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import './index';
-
-describe('component vnUserAliases', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnUserAliases', {$element: null});
- jest.spyOn(controller.vnApp, 'showSuccess');
- }));
-
- describe('refresh()', () => {
- it('should refresh the controller data', () => {
- $httpBackend.expectGET('MailAliasAccounts').respond('foo');
- controller.refresh();
- $httpBackend.flush();
-
- expect(controller.$.data).toBe('foo');
- });
- });
-
- describe('onAddSave()', () => {
- it('should add the new row', () => {
- controller.addData = {account: 1};
-
- $httpBackend.expectPOST('MailAliasAccounts').respond();
- $httpBackend.expectGET('MailAliasAccounts').respond('foo');
- controller.onAddSave();
- $httpBackend.flush();
-
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-
- describe('onRemove()', () => {
- it('shoud remove the passed row remote and locally', () => {
- controller.$.data = [
- {id: 1, alias: 'foo'},
- {id: 2, alias: 'bar'}
- ];
-
- $httpBackend.expectDELETE('MailAliasAccounts/1').respond();
- controller.onRemove(controller.$.data[0]);
- $httpBackend.flush();
-
- expect(controller.$.data).toEqual([{id: 2, alias: 'bar'}]);
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-});
diff --git a/modules/account/front/aliases/locale/es.yml b/modules/account/front/aliases/locale/es.yml
deleted file mode 100644
index 4d1ad76a74..0000000000
--- a/modules/account/front/aliases/locale/es.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-Unsubscribe: Desuscribir
-Subscribed to alias!: ¡Suscrito al alias!
-Unsubscribed from alias!: ¡Desuscrito del alias!
\ No newline at end of file
diff --git a/modules/account/front/basic-data/index.html b/modules/account/front/basic-data/index.html
deleted file mode 100644
index 9fd3506fe1..0000000000
--- a/modules/account/front/basic-data/index.html
+++ /dev/null
@@ -1,51 +0,0 @@
-
-
-
-
diff --git a/modules/account/front/basic-data/index.js b/modules/account/front/basic-data/index.js
deleted file mode 100644
index f6b266bbc0..0000000000
--- a/modules/account/front/basic-data/index.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- if (this.$params.emailConfirmed)
- this.vnApp.showSuccess(this.$t('Email verified successfully!'));
- }
-
- onSubmit() {
- this.$.watcher.submit()
- .then(() => this.card.reload());
- }
-}
-
-ngModule.component('vnUserBasicData', {
- template: require('./index.html'),
- controller: Controller,
- require: {
- card: '^vnUserCard'
- },
- bindings: {
- user: '<'
- }
-});
diff --git a/modules/account/front/basic-data/locale/es.yml b/modules/account/front/basic-data/locale/es.yml
deleted file mode 100644
index 2ca7bf6987..0000000000
--- a/modules/account/front/basic-data/locale/es.yml
+++ /dev/null
@@ -1 +0,0 @@
-Email verified successfully!: Correo verificado correctamente!
diff --git a/modules/account/front/card/index.html b/modules/account/front/card/index.html
deleted file mode 100644
index cba6b93c65..0000000000
--- a/modules/account/front/card/index.html
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
diff --git a/modules/account/front/card/index.js b/modules/account/front/card/index.js
deleted file mode 100644
index 2c8cc76379..0000000000
--- a/modules/account/front/card/index.js
+++ /dev/null
@@ -1,32 +0,0 @@
-import ngModule from '../module';
-import ModuleCard from 'salix/components/module-card';
-import './style.scss';
-
-class Controller extends ModuleCard {
- reload() {
- const filter = {
- where: {id: this.$params.id},
- include: {
- relation: 'role',
- scope: {
- fields: ['id', 'name']
- }
- }
- };
-
- return Promise.all([
- this.$http.get(`VnUsers/preview`, {filter})
- .then(res => {
- const [user] = res.data;
- this.user = user;
- }),
- this.$http.get(`Accounts/${this.$params.id}/exists`)
- .then(res => this.hasAccount = res.data.exists)
- ]);
- }
-}
-
-ngModule.vnComponent('vnUserCard', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/card/index.spec.js b/modules/account/front/card/index.spec.js
deleted file mode 100644
index 712d3c1d85..0000000000
--- a/modules/account/front/card/index.spec.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import './index';
-
-describe('component vnUserCard', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnUserCard', {$element: null});
- }));
-
- describe('reload()', () => {
- it('should reload the controller data', () => {
- controller.$params.id = 1;
-
- $httpBackend.expectGET('VnUsers/preview').respond('foo');
- $httpBackend.expectGET('Accounts/1/exists').respond({exists: true});
- controller.reload();
- $httpBackend.flush();
-
- expect(controller.user).toBe('f');
- expect(controller.hasAccount).toBeTruthy();
- });
- });
-});
diff --git a/modules/account/front/card/style.scss b/modules/account/front/card/style.scss
deleted file mode 100644
index 4d9d108a09..0000000000
--- a/modules/account/front/card/style.scss
+++ /dev/null
@@ -1,10 +0,0 @@
-@import "variables";
-
-.bg-title {
- display: block;
- text-align: center;
- padding: 24px;
- box-sizing: border-box;
- color: $color-font-secondary;
- font-size: 1.375rem;
-}
diff --git a/modules/account/front/connections/index.html b/modules/account/front/connections/index.html
deleted file mode 100644
index d634b7a9fc..0000000000
--- a/modules/account/front/connections/index.html
+++ /dev/null
@@ -1,45 +0,0 @@
-
-
-
-
-
-
-
- {{::row.user.username}}
- {{::row.created | date:'dd/MM HH:mm'}}
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/connections/index.js b/modules/account/front/connections/index.js
deleted file mode 100644
index c4ddd56153..0000000000
--- a/modules/account/front/connections/index.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- constructor(...args) {
- super(...args);
- this.filter = {
- fields: ['id', 'created', 'userId'],
- include: {
- relation: 'user',
- scope: {
- fields: ['username']
- }
- },
- order: 'created DESC'
- };
- }
-
- onDisconnect(row) {
- return this.$http.delete(`AccessTokens/${row.id}`)
- .then(() => this.$.model.refresh())
- .then(() => this.vnApp.showSuccess(this.$t('Session killed')));
- }
-}
-
-ngModule.component('vnConnections', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/connections/locale/es.yml b/modules/account/front/connections/locale/es.yml
deleted file mode 100644
index 41ef18b454..0000000000
--- a/modules/account/front/connections/locale/es.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-Go to user: Ir al usuario
-Refresh: Actualizar
-Session will be killed: Se va a matar la sesión
-Kill session: Matar sesión
-Session killed: Sesión matada
\ No newline at end of file
diff --git a/modules/account/front/create/index.html b/modules/account/front/create/index.html
deleted file mode 100644
index 70a5188857..0000000000
--- a/modules/account/front/create/index.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
diff --git a/modules/account/front/create/index.js b/modules/account/front/create/index.js
deleted file mode 100644
index 01ba7905b2..0000000000
--- a/modules/account/front/create/index.js
+++ /dev/null
@@ -1,20 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- constructor($element, $) {
- super($element, $);
- this.user = {active: true};
- }
-
- onSubmit() {
- return this.$.watcher.submit().then(res => {
- this.$state.go('account.card.basicData', {id: res.data.id});
- });
- }
-}
-
-ngModule.component('vnUserCreate', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/descriptor/__snapshots__/index.spec.js.snap b/modules/account/front/descriptor/__snapshots__/index.spec.js.snap
deleted file mode 100644
index de5f8e8c27..0000000000
--- a/modules/account/front/descriptor/__snapshots__/index.spec.js.snap
+++ /dev/null
@@ -1,5 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`component vnUserDescriptor onPassChange() should throw an error when password is empty 1`] = `"You must enter a new password"`;
-
-exports[`component vnUserDescriptor onPassChange() should throw an error when repeat password not matches new password 1`] = `"Passwords don't match"`;
diff --git a/modules/account/front/descriptor/index.spec.js b/modules/account/front/descriptor/index.spec.js
deleted file mode 100644
index 46c7e376c8..0000000000
--- a/modules/account/front/descriptor/index.spec.js
+++ /dev/null
@@ -1,97 +0,0 @@
-import './index';
-
-describe('component vnUserDescriptor', () => {
- let controller;
- let $httpBackend;
-
- let user = {id: 1, name: 'foo'};
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- $httpBackend.whenGET('Accounts/1/exists').respond({exists: true});
-
- controller = $componentController('vnUserDescriptor', {$element: null}, {user});
- jest.spyOn(controller, 'emit');
- jest.spyOn(controller.vnApp, 'showSuccess');
- }));
-
- describe('onDelete()', () => {
- it('should delete entity and go to index', () => {
- controller.$state.go = jest.fn();
-
- $httpBackend.expectDELETE('VnUsers/1').respond();
- controller.onDelete();
- $httpBackend.flush();
-
- expect(controller.$state.go).toHaveBeenCalledWith('account.index');
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-
- describe('onPassChange()', () => {
- it('should throw an error when password is empty', () => {
- expect(() => {
- controller.onPassChange();
- }).toThrowErrorMatchingSnapshot();
- });
-
- it('should throw an error when repeat password not matches new password', () => {
- controller.newPassword = 'foo';
- controller.repeatPassword = 'bar';
-
- expect(() => {
- controller.onPassChange();
- }).toThrowErrorMatchingSnapshot();
- });
-
- it('should make a request when password checks passes', () => {
- controller.newPassword = 'foo';
- controller.repeatPassword = 'foo';
-
- $httpBackend.expectPATCH('Accounts/1/setPassword').respond();
- controller.onPassChange();
- $httpBackend.flush();
-
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- expect(controller.emit).toHaveBeenCalledWith('change');
- });
- });
-
- describe('onEnableAccount()', () => {
- it('should make request to enable account', () => {
- $httpBackend.expectPOST('Accounts', {id: 1}).respond();
- controller.onEnableAccount();
- $httpBackend.flush();
-
- expect(controller.hasAccount).toBeTruthy();
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- expect(controller.emit).toHaveBeenCalledWith('change');
- });
- });
-
- describe('onDisableAccount()', () => {
- it('should make request to disable account', () => {
- $httpBackend.expectDELETE('Accounts/1').respond();
- controller.onDisableAccount();
- $httpBackend.flush();
-
- expect(controller.hasAccount).toBeFalsy();
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- expect(controller.emit).toHaveBeenCalledWith('change');
- });
- });
-
- describe('onSetActive()', () => {
- it('should make request to activate/deactivate the user', () => {
- $httpBackend.expectPATCH('VnUsers/1', {active: true}).respond();
- controller.onSetActive(true);
- $httpBackend.flush();
-
- expect(controller.user.active).toBeTruthy();
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- expect(controller.emit).toHaveBeenCalledWith('change');
- });
- });
-});
diff --git a/modules/account/front/index.js b/modules/account/front/index.js
index 4d6aedcaeb..0f22088628 100644
--- a/modules/account/front/index.js
+++ b/modules/account/front/index.js
@@ -1,24 +1,6 @@
export * from './module';
import './main';
-import './index/';
-import './role';
-import './alias';
-import './connections';
-import './acl';
-import './summary';
-import './card';
import './descriptor';
import './descriptor-popover';
-import './search-panel';
-import './create';
-import './basic-data';
-import './mail-forwarding';
-import './aliases';
-import './roles';
-import './ldap';
-import './samba';
-import './accounts';
-import './privileges';
-import './user-log';
-import './role-log';
+import './summary';
diff --git a/modules/account/front/index/index.html b/modules/account/front/index/index.html
deleted file mode 100644
index 7502c8b3dc..0000000000
--- a/modules/account/front/index/index.html
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/index/index.js b/modules/account/front/index/index.js
deleted file mode 100644
index 9324ca740b..0000000000
--- a/modules/account/front/index/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- preview(user) {
- this.selectedUser = user;
- this.$.summary.show();
- }
-}
-
-ngModule.component('vnUserIndex', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/index/locale/es.yml b/modules/account/front/index/locale/es.yml
deleted file mode 100644
index 074fb054ed..0000000000
--- a/modules/account/front/index/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-New user: Nuevo usuario
-View user: Ver usuario
\ No newline at end of file
diff --git a/modules/account/front/ldap/index.html b/modules/account/front/ldap/index.html
deleted file mode 100644
index 23356452a7..0000000000
--- a/modules/account/front/ldap/index.html
+++ /dev/null
@@ -1,66 +0,0 @@
-
-
-
diff --git a/modules/account/front/ldap/index.js b/modules/account/front/ldap/index.js
deleted file mode 100644
index 40e1e8db16..0000000000
--- a/modules/account/front/ldap/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onTestConection() {
- this.$http.get(`LdapConfigs/test`)
- .then(() => this.vnApp.showSuccess(this.$t('LDAP connection established!')));
- }
-}
-
-ngModule.component('vnAccountLdap', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/ldap/locale/es.yml b/modules/account/front/ldap/locale/es.yml
deleted file mode 100644
index 0353d6b72e..0000000000
--- a/modules/account/front/ldap/locale/es.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-Enable synchronization: Habilitar sincronización
-Server: Servidor
-RDN: RDN
-User DN: DN usuarios
-Filter: Filtro
-Group DN: DN grupos
-Test connection: Probar conexión
-LDAP connection established!: ¡Conexión con LDAP establecida!
diff --git a/modules/account/front/mail-forwarding/index.html b/modules/account/front/mail-forwarding/index.html
deleted file mode 100644
index df5cd80bf1..0000000000
--- a/modules/account/front/mail-forwarding/index.html
+++ /dev/null
@@ -1,49 +0,0 @@
-
-
-
-
-
-
- Account not enabled
-
diff --git a/modules/account/front/mail-forwarding/index.js b/modules/account/front/mail-forwarding/index.js
deleted file mode 100644
index 5118e8eaba..0000000000
--- a/modules/account/front/mail-forwarding/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {}
-
-ngModule.component('vnUserMailForwarding', {
- template: require('./index.html'),
- controller: Controller,
- require: {
- card: '^vnUserCard'
- },
-});
diff --git a/modules/account/front/mail-forwarding/locale/es.yml b/modules/account/front/mail-forwarding/locale/es.yml
deleted file mode 100644
index 688ace6b5a..0000000000
--- a/modules/account/front/mail-forwarding/locale/es.yml
+++ /dev/null
@@ -1,7 +0,0 @@
-Mail forwarding: Reenvío de correo
-Forward email: Dirección de reenvío
-Enable mail forwarding: Habilitar redirección de correo
-All emails will be forwarded to the specified address.: >
- Todos los correos serán reenviados a la dirección especificada, no se
- mantendrá copia de los mismos en el buzón del usuario.
-You don't have enough privileges: No tienes suficientes permisos
diff --git a/modules/account/front/main/index.html b/modules/account/front/main/index.html
index 36b493ec4d..e69de29bb2 100644
--- a/modules/account/front/main/index.html
+++ b/modules/account/front/main/index.html
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/main/index.js b/modules/account/front/main/index.js
index a43ffb76b3..335d71b42b 100644
--- a/modules/account/front/main/index.js
+++ b/modules/account/front/main/index.js
@@ -4,32 +4,10 @@ import ModuleMain from 'salix/components/module-main';
export default class User extends ModuleMain {
constructor($element, $) {
super($element, $);
- this.filter = {
- fields: ['id', 'nickname', 'name', 'role'],
- include: {
- relation: 'role',
- scope: {
- fields: ['id', 'name']
- }
- }
- };
}
-
- exprBuilder(param, value) {
- switch (param) {
- case 'search':
- return /^\d+$/.test(value)
- ? {id: value}
- : {or: [
- {name: {like: `%${value}%`}},
- {nickname: {like: `%${value}%`}}
- ]};
- case 'name':
- case 'nickname':
- return {[param]: {like: `%${value}%`}};
- case 'roleFk':
- return {[param]: value};
- }
+ async $onInit() {
+ this.$state.go('home');
+ window.location.href = await this.vnApp.getUrl(`account/`);
}
}
diff --git a/modules/account/front/main/index.spec.js b/modules/account/front/main/index.spec.js
deleted file mode 100644
index c232aa8493..0000000000
--- a/modules/account/front/main/index.spec.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import './index';
-
-describe('component vnUser', () => {
- let controller;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject($componentController => {
- controller = $componentController('vnUser', {$element: null});
- }));
-
- describe('exprBuilder()', () => {
- it('should search by id when only digits string is passed', () => {
- let expr = controller.exprBuilder('search', '1');
-
- expect(expr).toEqual({id: '1'});
- });
-
- it('should search by name when non-only digits string is passed', () => {
- let expr = controller.exprBuilder('search', '1foo');
-
- expect(expr).toEqual({or: [
- {name: {like: '%1foo%'}},
- {nickname: {like: '%1foo%'}}
- ]});
- });
- });
-});
diff --git a/modules/account/front/privileges/index.html b/modules/account/front/privileges/index.html
deleted file mode 100644
index 343c179e31..0000000000
--- a/modules/account/front/privileges/index.html
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
diff --git a/modules/account/front/privileges/index.js b/modules/account/front/privileges/index.js
deleted file mode 100644
index f69428666b..0000000000
--- a/modules/account/front/privileges/index.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- get user() {
- return this._user;
- }
-
- set user(value) {
- this._user = value;
- if (!value) return;
- }
-}
-
-ngModule.component('vnUserPrivileges', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- user: '<'
- }
-});
diff --git a/modules/account/front/privileges/locale/es.yml b/modules/account/front/privileges/locale/es.yml
deleted file mode 100644
index d66a7a6cf5..0000000000
--- a/modules/account/front/privileges/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-Privileges: Privilegios
-Has grant: Puede delegar privilegios
diff --git a/modules/account/front/role-log/index.html b/modules/account/front/role-log/index.html
deleted file mode 100644
index 9e2b151b54..0000000000
--- a/modules/account/front/role-log/index.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/modules/account/front/role-log/index.js b/modules/account/front/role-log/index.js
deleted file mode 100644
index 02448ccaa5..0000000000
--- a/modules/account/front/role-log/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-ngModule.vnComponent('vnRoleLog', {
- template: require('./index.html'),
- controller: Section,
-});
diff --git a/modules/account/front/role/basic-data/index.html b/modules/account/front/role/basic-data/index.html
deleted file mode 100644
index 846f8b455e..0000000000
--- a/modules/account/front/role/basic-data/index.html
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
diff --git a/modules/account/front/role/basic-data/index.js b/modules/account/front/role/basic-data/index.js
deleted file mode 100644
index 4e26906eea..0000000000
--- a/modules/account/front/role/basic-data/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {}
-
-ngModule.component('vnRoleBasicData', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- role: '<'
- }
-});
diff --git a/modules/account/front/role/card/index.html b/modules/account/front/role/card/index.html
deleted file mode 100644
index 2f51f88b5c..0000000000
--- a/modules/account/front/role/card/index.html
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/modules/account/front/role/card/index.js b/modules/account/front/role/card/index.js
deleted file mode 100644
index 3c7c758efc..0000000000
--- a/modules/account/front/role/card/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../../module';
-import ModuleCard from 'salix/components/module-card';
-
-class Controller extends ModuleCard {
- reload() {
- this.$http.get(`VnRoles/${this.$params.id}`)
- .then(res => this.role = res.data);
- }
-}
-
-ngModule.vnComponent('vnRoleCard', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/role/card/index.spec.js b/modules/account/front/role/card/index.spec.js
deleted file mode 100644
index 569fe487d2..0000000000
--- a/modules/account/front/role/card/index.spec.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import './index';
-
-describe('component vnRoleCard', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnRoleCard', {$element: null});
- }));
-
- describe('reload()', () => {
- it('should reload the controller data', () => {
- controller.$params.id = 1;
-
- $httpBackend.expectGET('VnRoles/1').respond('foo');
- controller.reload();
- $httpBackend.flush();
-
- expect(controller.role).toBe('foo');
- });
- });
-});
diff --git a/modules/account/front/role/create/index.html b/modules/account/front/role/create/index.html
deleted file mode 100644
index 77d6fc2c1f..0000000000
--- a/modules/account/front/role/create/index.html
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
diff --git a/modules/account/front/role/create/index.js b/modules/account/front/role/create/index.js
deleted file mode 100644
index 3f7fcc9cf5..0000000000
--- a/modules/account/front/role/create/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onSubmit() {
- return this.$.watcher.submit().then(res =>
- this.$state.go('account.role.card.basicData', {id: res.data.id})
- );
- }
-}
-
-ngModule.component('vnRoleCreate', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/role/descriptor/index.html b/modules/account/front/role/descriptor/index.html
deleted file mode 100644
index d8bf4857a0..0000000000
--- a/modules/account/front/role/descriptor/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- Delete
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/role/descriptor/index.js b/modules/account/front/role/descriptor/index.js
deleted file mode 100644
index 17b585cb79..0000000000
--- a/modules/account/front/role/descriptor/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import ngModule from '../../module';
-import Descriptor from 'salix/components/descriptor';
-
-class Controller extends Descriptor {
- get role() {
- return this.entity;
- }
-
- set role(value) {
- this.entity = value;
- }
-
- onDelete() {
- return this.$http.delete(`VnRoles/${this.id}`)
- .then(() => this.$state.go('account.role'))
- .then(() => this.vnApp.showSuccess(this.$t('Role removed')));
- }
-}
-
-ngModule.component('vnRoleDescriptor', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- role: '<'
- }
-});
diff --git a/modules/account/front/role/descriptor/index.spec.js b/modules/account/front/role/descriptor/index.spec.js
deleted file mode 100644
index f3b2e4763a..0000000000
--- a/modules/account/front/role/descriptor/index.spec.js
+++ /dev/null
@@ -1,29 +0,0 @@
-import './index';
-
-describe('component vnRoleDescriptor', () => {
- let controller;
- let $httpBackend;
-
- let role = {id: 1, name: 'foo'};
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnRoleDescriptor', {$element: null}, {role});
- }));
-
- describe('onDelete()', () => {
- it('should delete entity and go to index', () => {
- controller.$state.go = jest.fn();
- jest.spyOn(controller.vnApp, 'showSuccess');
-
- $httpBackend.expectDELETE('VnRoles/1').respond();
- controller.onDelete();
- $httpBackend.flush();
-
- expect(controller.$state.go).toHaveBeenCalledWith('account.role');
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-});
diff --git a/modules/account/front/role/descriptor/locale/es.yml b/modules/account/front/role/descriptor/locale/es.yml
deleted file mode 100644
index 1ca512e4f9..0000000000
--- a/modules/account/front/role/descriptor/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-Role will be removed: El rol va a ser eliminado
-Role removed: Rol eliminado
\ No newline at end of file
diff --git a/modules/account/front/role/index.js b/modules/account/front/role/index.js
deleted file mode 100644
index 97a20d3bcf..0000000000
--- a/modules/account/front/role/index.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import './main';
-import './index/';
-import './summary';
-import './card';
-import './descriptor';
-import './search-panel';
-import './create';
-import './basic-data';
-import './subroles';
-import './inherited';
diff --git a/modules/account/front/role/index/index.html b/modules/account/front/role/index/index.html
deleted file mode 100644
index 4c4c6b0adf..0000000000
--- a/modules/account/front/role/index/index.html
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/role/index/index.js b/modules/account/front/role/index/index.js
deleted file mode 100644
index 40773b23b3..0000000000
--- a/modules/account/front/role/index/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- preview(role) {
- this.selectedRole = role;
- this.$.summary.show();
- }
-}
-
-ngModule.component('vnRoleIndex', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/role/index/locale/es.yml b/modules/account/front/role/index/locale/es.yml
deleted file mode 100644
index 70932e9833..0000000000
--- a/modules/account/front/role/index/locale/es.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-New role: Nuevo rol
-View role: Ver rol
\ No newline at end of file
diff --git a/modules/account/front/role/inherited/index.html b/modules/account/front/role/inherited/index.html
deleted file mode 100644
index 83ecbbff48..0000000000
--- a/modules/account/front/role/inherited/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
- {{::row.inherits.name}}
-
-
- {{::row.inherits.description}}
-
-
-
-
-
-
diff --git a/modules/account/front/role/inherited/index.js b/modules/account/front/role/inherited/index.js
deleted file mode 100644
index 5927493eeb..0000000000
--- a/modules/account/front/role/inherited/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- let filter = {
- where: {role: this.$params.id},
- include: {
- relation: 'inherits',
- scope: {
- fields: ['id', 'name', 'description']
- }
- }
- };
- this.$http.get('RoleRoles', {filter})
- .then(res => this.$.data = res.data);
- }
-}
-
-ngModule.component('vnRoleInherited', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/role/inherited/index.spec.js b/modules/account/front/role/inherited/index.spec.js
deleted file mode 100644
index 16b0c53b26..0000000000
--- a/modules/account/front/role/inherited/index.spec.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import './index';
-
-describe('component vnRoleInherited', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnRoleInherited', {$element: null});
- }));
-
- describe('$onInit()', () => {
- it('should delete entity and go to index', () => {
- $httpBackend.expectGET('RoleRoles').respond('foo');
- controller.$onInit();
- $httpBackend.flush();
-
- expect(controller.$.data).toBe('foo');
- });
- });
-});
diff --git a/modules/account/front/role/locale/es.yml b/modules/account/front/role/locale/es.yml
deleted file mode 100644
index 159fc7f161..0000000000
--- a/modules/account/front/role/locale/es.yml
+++ /dev/null
@@ -1 +0,0 @@
-Subroles: Subroles
diff --git a/modules/account/front/role/main/index.html b/modules/account/front/role/main/index.html
deleted file mode 100644
index cfef28e57a..0000000000
--- a/modules/account/front/role/main/index.html
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/role/main/index.js b/modules/account/front/role/main/index.js
deleted file mode 100644
index 77d15cf17d..0000000000
--- a/modules/account/front/role/main/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import ngModule from '../../module';
-import ModuleMain from 'salix/components/module-main';
-
-export default class Role extends ModuleMain {
- exprBuilder(param, value) {
- switch (param) {
- case 'search':
- return /^\d+$/.test(value)
- ? {id: value}
- : {or: [
- {name: {like: `%${value}%`}},
- {nickname: {like: `%${value}%`}}
- ]};
- case 'name':
- case 'description':
- return {[param]: {like: `%${value}%`}};
- }
- }
-}
-
-ngModule.vnComponent('vnRole', {
- controller: Role,
- template: require('./index.html')
-});
diff --git a/modules/account/front/role/search-panel/index.html b/modules/account/front/role/search-panel/index.html
deleted file mode 100644
index dfea9f01cd..0000000000
--- a/modules/account/front/role/search-panel/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/role/search-panel/index.js b/modules/account/front/role/search-panel/index.js
deleted file mode 100644
index 35da591ad4..0000000000
--- a/modules/account/front/role/search-panel/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import ngModule from '../../module';
-import SearchPanel from 'core/components/searchbar/search-panel';
-
-ngModule.component('vnRoleSearchPanel', {
- template: require('./index.html'),
- controller: SearchPanel
-});
diff --git a/modules/account/front/role/subroles/index.html b/modules/account/front/role/subroles/index.html
deleted file mode 100644
index eba1002b0e..0000000000
--- a/modules/account/front/role/subroles/index.html
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-
-
-
-
- {{::row.inherits.name}}
-
-
- {{::row.inherits.description}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/account/front/role/subroles/index.js b/modules/account/front/role/subroles/index.js
deleted file mode 100644
index b7e1caaa4f..0000000000
--- a/modules/account/front/role/subroles/index.js
+++ /dev/null
@@ -1,51 +0,0 @@
-import ngModule from '../../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- this.refresh();
- }
-
- get path() {
- return `RoleInherits`;
- }
-
- refresh() {
- let filter = {
- where: {role: this.$params.id},
- include: {
- relation: 'inherits',
- scope: {
- fields: ['id', 'name', 'description']
- }
- }
- };
- this.$http.get(this.path, {filter})
- .then(res => this.$.data = res.data);
- }
-
- onAddClick() {
- this.addData = {role: this.$params.id};
- this.$.dialog.show();
- }
-
- onAddSave() {
- return this.$http.post(this.path, this.addData)
- .then(() => this.refresh())
- .then(() => this.vnApp.showSuccess(this.$t('Role added! Changes will take a while to fully propagate.')));
- }
-
- onRemove(row) {
- return this.$http.delete(`${this.path}/${row.id}`)
- .then(() => {
- let index = this.$.data.indexOf(row);
- if (index !== -1) this.$.data.splice(index, 1);
- this.vnApp.showSuccess(this.$t('Role removed. Changes will take a while to fully propagate.'));
- });
- }
-}
-
-ngModule.component('vnRoleSubroles', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/role/subroles/index.spec.js b/modules/account/front/role/subroles/index.spec.js
deleted file mode 100644
index e7d9a4d0e2..0000000000
--- a/modules/account/front/role/subroles/index.spec.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import './index';
-
-describe('component vnRoleSubroles', () => {
- let controller;
- let $httpBackend;
-
- beforeEach(ngModule('account'));
-
- beforeEach(inject(($componentController, _$httpBackend_) => {
- $httpBackend = _$httpBackend_;
- controller = $componentController('vnRoleSubroles', {$element: null});
- jest.spyOn(controller.vnApp, 'showSuccess');
- }));
-
- describe('refresh()', () => {
- it('should delete entity and go to index', () => {
- $httpBackend.expectGET('RoleInherits').respond('foo');
- controller.refresh();
- $httpBackend.flush();
-
- expect(controller.$.data).toBe('foo');
- });
- });
-
- describe('onAddSave()', () => {
- it('should add a subrole', () => {
- controller.addData = {role: 'foo'};
-
- $httpBackend.expectPOST('RoleInherits', {role: 'foo'}).respond();
- $httpBackend.expectGET('RoleInherits').respond();
- controller.onAddSave();
- $httpBackend.flush();
-
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-
- describe('onRemove()', () => {
- it('should remove a subrole', () => {
- controller.$.data = [
- {id: 1, name: 'foo'},
- {id: 2, name: 'bar'}
- ];
-
- $httpBackend.expectDELETE('RoleInherits/1').respond();
- controller.onRemove(controller.$.data[0]);
- $httpBackend.flush();
-
- expect(controller.$.data).toEqual([{id: 2, name: 'bar'}]);
- expect(controller.vnApp.showSuccess).toHaveBeenCalled();
- });
- });
-});
diff --git a/modules/account/front/role/subroles/locale/es.yml b/modules/account/front/role/subroles/locale/es.yml
deleted file mode 100644
index 170882405e..0000000000
--- a/modules/account/front/role/subroles/locale/es.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-Role added! Changes will take a while to fully propagate.: >
- ¡Rol añadido! Los cambios tardaran un tiempo en propagarse completamente.
-Role removed. Changes will take a while to fully propagate.: >
- Rol eliminado. Los cambios tardaran un tiempo en propagarse completamente.
diff --git a/modules/account/front/role/summary/index.html b/modules/account/front/role/summary/index.html
deleted file mode 100644
index f7971190c3..0000000000
--- a/modules/account/front/role/summary/index.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
- {{summary.name}}
-
-
- Basic data
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/modules/account/front/role/summary/index.js b/modules/account/front/role/summary/index.js
deleted file mode 100644
index 6c649a68f0..0000000000
--- a/modules/account/front/role/summary/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import ngModule from '../../module';
-import Component from 'core/lib/component';
-
-class Controller extends Component {
- set role(value) {
- this._role = value;
- this.$.summary = null;
- if (!value) return;
- this.$http.get(`VnRoles/${value.id}`)
- .then(res => this.$.summary = res.data);
- }
-
- get role() {
- return this._role;
- }
-}
-
-ngModule.component('vnRoleSummary', {
- template: require('./index.html'),
- controller: Controller,
- bindings: {
- role: '<'
- }
-});
diff --git a/modules/account/front/roles/index.html b/modules/account/front/roles/index.html
deleted file mode 100644
index 8c85839298..0000000000
--- a/modules/account/front/roles/index.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
- {{::row.role.name}}
-
-
- {{::row.role.description}}
-
-
-
-
-
-
diff --git a/modules/account/front/roles/index.js b/modules/account/front/roles/index.js
deleted file mode 100644
index 0982dcf105..0000000000
--- a/modules/account/front/roles/index.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- $onInit() {
- let filter = {
- where: {
- prindicpalType: 'USER',
- principalId: this.$params.id
- },
- include: {
- relation: 'role',
- scope: {
- fields: ['id', 'name', 'description']
- }
- }
- };
- this.$http.get('RoleMappings', {filter})
- .then(res => this.$.data = res.data);
- }
-}
-
-ngModule.component('vnUserRoles', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/routes.json b/modules/account/front/routes.json
index d7845090b2..9eadf2af21 100644
--- a/modules/account/front/routes.json
+++ b/modules/account/front/routes.json
@@ -7,31 +7,6 @@
"menus": {
"main": [
{"state": "account.index", "icon": "face"},
- {"state": "account.role", "icon": "group"},
- {"state": "account.alias", "icon": "email"},
- {"state": "account.accounts", "icon": "accessibility"},
- {"state": "account.ldap", "icon": "account_tree"},
- {"state": "account.samba", "icon": "preview"},
- {"state": "account.acl", "icon": "check"},
- {"state": "account.connections", "icon": "share"}
- ],
- "card": [
- {"state": "account.card.basicData", "icon": "settings"},
- {"state": "account.card.roles", "icon": "group"},
- {"state": "account.card.mailForwarding", "icon": "forward"},
- {"state": "account.card.aliases", "icon": "email"},
- {"state": "account.card.privileges", "icon": "badge"},
- {"state": "account.card.log", "icon": "history"}
- ],
- "role": [
- {"state": "account.role.card.basicData", "icon": "settings"},
- {"state": "account.role.card.subroles", "icon": "groups"},
- {"state": "account.role.card.inherited", "icon": "account_tree"},
- {"state": "account.role.card.log", "icon": "history"}
- ],
- "alias": [
- {"state": "account.alias.card.basicData", "icon": "settings"},
- {"state": "account.alias.card.users", "icon": "groups"}
]
},
"keybindings": [
@@ -50,224 +25,6 @@
"state": "account.index",
"component": "vn-user-index",
"description": "Users"
- },
- {
- "url": "/create",
- "state": "account.create",
- "component": "vn-user-create",
- "description": "New user"
- },
- {
- "url": "/:id",
- "state": "account.card",
- "component": "vn-user-card",
- "abstract": true,
- "description": "Detail"
- },
- {
- "url": "/summary",
- "state": "account.card.summary",
- "component": "vn-user-summary",
- "description": "Summary",
- "params": {
- "user": "$ctrl.user"
- }
- },
- {
- "url": "/basic-data?emailConfirmed",
- "state": "account.card.basicData",
- "component": "vn-user-basic-data",
- "description": "Basic data",
- "params": {
- "user": "$ctrl.user"
- }
- },
- {
- "url" : "/log",
- "state": "account.card.log",
- "component": "vn-user-log",
- "description": "Log"
- },
- {
- "url" : "/log",
- "state": "account.role.card.log",
- "component": "vn-role-log",
- "description": "Log"
- },
- {
- "url": "/roles",
- "state": "account.card.roles",
- "component": "vn-user-roles",
- "description": "Inherited roles"
- },
- {
- "url": "/mail-forwarding",
- "state": "account.card.mailForwarding",
- "component": "vn-user-mail-forwarding",
- "description": "Mail forwarding"
- },
- {
- "url": "/aliases",
- "state": "account.card.aliases",
- "component": "vn-user-aliases",
- "description": "Mail aliases"
- },
- {
- "url": "/privileges",
- "state": "account.card.privileges",
- "component": "vn-user-privileges",
- "description": "Privileges",
- "params": {
- "user": "$ctrl.user"
- }
- },
- {
- "url": "/role?q",
- "state": "account.role",
- "component": "vn-role",
- "description": "Roles",
- "acl": ["it"]
- },
- {
- "url": "/create",
- "state": "account.role.create",
- "component": "vn-role-create",
- "description": "New role",
- "acl": ["it"]
- },
- {
- "url": "/:id",
- "state": "account.role.card",
- "component": "vn-role-card",
- "abstract": true,
- "description": "Detail"
- },
- {
- "url": "/summary",
- "state": "account.role.card.summary",
- "component": "vn-role-summary",
- "description": "Summary",
- "params": {
- "role": "$ctrl.role"
- },
- "acl": ["it"]
- },
- {
- "url": "/basic-data",
- "state": "account.role.card.basicData",
- "component": "vn-role-basic-data",
- "description": "Basic data",
- "params": {
- "role": "$ctrl.role"
- },
- "acl": ["it"]
- },
- {
- "url": "/subroles",
- "state": "account.role.card.subroles",
- "component": "vn-role-subroles",
- "description": "Subroles",
- "acl": ["it"]
- },
- {
- "url": "/inherited",
- "state": "account.role.card.inherited",
- "component": "vn-role-inherited",
- "description": "Inherited roles",
- "acl": ["it"]
- },
- {
- "url": "/alias?q",
- "state": "account.alias",
- "component": "vn-alias",
- "description": "Mail aliases"
- },
- {
- "url": "/create",
- "state": "account.alias.create",
- "component": "vn-alias-create",
- "description": "New alias"
- },
- {
- "url": "/:id",
- "state": "account.alias.card",
- "component": "vn-alias-card",
- "abstract": true,
- "description": "Detail"
- },
- {
- "url": "/summary",
- "state": "account.alias.card.summary",
- "component": "vn-alias-summary",
- "description": "Summary",
- "params": {
- "alias": "$ctrl.alias"
- }
- },
- {
- "url": "/basic-data",
- "state": "account.alias.card.basicData",
- "component": "vn-alias-basic-data",
- "description": "Basic data",
- "params": {
- "alias": "$ctrl.alias"
- }
- },
- {
- "url": "/users",
- "state": "account.alias.card.users",
- "component": "vn-alias-users",
- "description": "Users",
- "acl": ["it"]
- },
- {
- "url": "/accounts",
- "state": "account.accounts",
- "component": "vn-account-accounts",
- "description": "Accounts",
- "acl": ["sysadmin"]
- },
- {
- "url": "/ldap",
- "state": "account.ldap",
- "component": "vn-account-ldap",
- "description": "LDAP",
- "acl": ["sysadmin"]
- },
- {
- "url": "/samba",
- "state": "account.samba",
- "component": "vn-account-samba",
- "description": "Samba",
- "acl": ["sysadmin"]
- },
- {
- "url": "/acl?q",
- "state": "account.acl",
- "component": "vn-acl-component",
- "description": "ACLs",
- "acl": ["developer"]
- },
- {
- "url": "/create",
- "state": "account.acl.create",
- "component": "vn-acl-create",
- "description": "New ACL",
- "acl": ["developer"]
- },
- {
- "url": "/:id/edit",
- "state": "account.acl.edit",
- "component": "vn-acl-create",
- "description": "Edit ACL",
- "acl": ["developer"]
- },
- {
- "url": "/connections",
- "state": "account.connections",
- "component": "vn-connections",
- "description": "Connections",
- "acl": ["developer"]
}
]
}
diff --git a/modules/account/front/samba/index.html b/modules/account/front/samba/index.html
deleted file mode 100644
index 0186cac7c8..0000000000
--- a/modules/account/front/samba/index.html
+++ /dev/null
@@ -1,71 +0,0 @@
-
-
-
diff --git a/modules/account/front/samba/index.js b/modules/account/front/samba/index.js
deleted file mode 100644
index 6a49698933..0000000000
--- a/modules/account/front/samba/index.js
+++ /dev/null
@@ -1,14 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-export default class Controller extends Section {
- onTestConection() {
- this.$http.get(`SambaConfigs/test`)
- .then(() => this.vnApp.showSuccess(this.$t('Samba connection established!')));
- }
-}
-
-ngModule.component('vnAccountSamba', {
- template: require('./index.html'),
- controller: Controller
-});
diff --git a/modules/account/front/samba/locale/es.yml b/modules/account/front/samba/locale/es.yml
deleted file mode 100644
index efa3b15979..0000000000
--- a/modules/account/front/samba/locale/es.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-Enable synchronization: Habilitar sincronización
-Domain controller: Controlador de dominio
-AD domain: Dominio AD
-AD user: Usuario AD
-AD password: Contraseña AD
-User DN (without domain part): DN usuarios (sin la parte del dominio)
-Verify certificate: Verificar certificado
-Test connection: Probar conexión
-Samba connection established!: ¡Conexión con Samba establecida!
diff --git a/modules/account/front/search-panel/index.html b/modules/account/front/search-panel/index.html
deleted file mode 100644
index a539d96576..0000000000
--- a/modules/account/front/search-panel/index.html
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
diff --git a/modules/account/front/search-panel/index.js b/modules/account/front/search-panel/index.js
deleted file mode 100644
index fff3bf7b9c..0000000000
--- a/modules/account/front/search-panel/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import ngModule from '../module';
-import SearchPanel from 'core/components/searchbar/search-panel';
-
-ngModule.component('vnUserSearchPanel', {
- template: require('./index.html'),
- controller: SearchPanel
-});
diff --git a/modules/account/front/summary/index.html b/modules/account/front/summary/index.html
index 41632aef69..f3c11f25f3 100644
--- a/modules/account/front/summary/index.html
+++ b/modules/account/front/summary/index.html
@@ -1,6 +1,6 @@
\ No newline at end of file
+
diff --git a/modules/account/front/user-log/index.html b/modules/account/front/user-log/index.html
deleted file mode 100644
index 5a77ed7b9f..0000000000
--- a/modules/account/front/user-log/index.html
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/modules/account/front/user-log/index.js b/modules/account/front/user-log/index.js
deleted file mode 100644
index 7cd0bb378d..0000000000
--- a/modules/account/front/user-log/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-import ngModule from '../module';
-import Section from 'salix/components/section';
-
-ngModule.vnComponent('vnUserLog', {
- template: require('./index.html'),
- controller: Section,
-});
diff --git a/modules/client/back/methods/defaulter/filter.js b/modules/client/back/methods/defaulter/filter.js
index 40756b2369..9f19dee0ae 100644
--- a/modules/client/back/methods/defaulter/filter.js
+++ b/modules/client/back/methods/defaulter/filter.js
@@ -83,9 +83,14 @@ module.exports = Self => {
LEFT JOIN account.user u ON u.id = c.salesPersonFk
LEFT JOIN account.user uw ON uw.id = co.workerFk
LEFT JOIN (
- SELECT MAX(started), clientFk, finished
- FROM recovery
- GROUP BY clientFk
+ SELECT r1.started, r1.clientFk, r1.finished
+ FROM recovery r1
+ JOIN (
+ SELECT MAX(started) AS maxStarted, clientFk
+ FROM recovery
+ GROUP BY clientFk
+ ) r2 ON r1.clientFk = r2.clientFk
+ AND r1.started = r2.maxStarted
) r ON r.clientFk = c.id
LEFT JOIN workerDepartment wd ON wd.workerFk = u.id
JOIN department dp ON dp.id = wd.departmentFk
diff --git a/modules/worker/back/locale/worker-time-control/en.yml b/modules/worker/back/locale/worker-time-control/en.yml
new file mode 100644
index 0000000000..f1de664747
--- /dev/null
+++ b/modules/worker/back/locale/worker-time-control/en.yml
@@ -0,0 +1,7 @@
+name: time control
+columns:
+ direction: direction
+ isSendMail: sent mail
+ logExclude: excluded log
+ manual: manual
+ timed: timed
diff --git a/modules/worker/back/locale/worker-time-control/es.yml b/modules/worker/back/locale/worker-time-control/es.yml
new file mode 100644
index 0000000000..1739c487ce
--- /dev/null
+++ b/modules/worker/back/locale/worker-time-control/es.yml
@@ -0,0 +1,7 @@
+name: control horario
+columns:
+ direction: dirección
+ isSendMail: correo enviado
+ logExclude: registro excluido
+ manual: manual
+ timed: fichada
\ No newline at end of file