refs #6085 aclMail back #1869

Merged
carlossa merged 16 commits from 6085-ACLsMail into dev 2024-01-03 07:56:11 +00:00
5 changed files with 77 additions and 0 deletions
Showing only changes of commit 0186c2c806 - Show all commits

View File

@ -0,0 +1,7 @@
-- Definición de la tabla mailAliasACL
carlossa marked this conversation as resolved Outdated
Outdated
Review

Cambiar a nueva versión

Cambiar a nueva versión
CREATE TABLE `account`.`mailAliasACL` (
carlossa marked this conversation as resolved Outdated
Outdated
Review

CREATE OR REPLACE

CREATE OR REPLACE
`mailAliasFk` int(10) unsigned NOT NULL,
`roleFk` int(10) unsigned NOT NULL,
FOREIGN KEY (`mailAliasFk`) REFERENCES `account`.`mailAlias` (`id`),
FOREIGN KEY (`roleFk`) REFERENCES `account`.`role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

View File

@ -0,0 +1,33 @@
import ngModule from '../../module';
carlossa marked this conversation as resolved Outdated
Outdated
Review

El front carregatelo

El front carregatelo
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('vnAclMailCreate', {
template: require('./index.html'),
controller: Controller
});

View File

@ -0,0 +1,4 @@
import './main';
import './index/';
import './create';
import './search-panel';

View File

@ -0,0 +1,15 @@
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('vnAclMailIndex', {
template: require('./index.html'),
controller: Controller
});

View File

@ -0,0 +1,18 @@
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('vnAclMailComponent', {
controller: ACL,
template: require('./index.html')
});