refs #6085 aclMail back #1869
|
@ -0,0 +1,7 @@
|
||||||
|
-- Definición de la tabla mailAliasACL
|
||||||
carlossa marked this conversation as resolved
Outdated
|
|||||||
|
CREATE TABLE `account`.`mailAliasACL` (
|
||||||
carlossa marked this conversation as resolved
Outdated
alexm
commented
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;
|
|
@ -0,0 +1,33 @@
|
||||||
|
import ngModule from '../../module';
|
||||||
carlossa marked this conversation as resolved
Outdated
alexm
commented
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
|
||||||
|
});
|
|
@ -0,0 +1,4 @@
|
||||||
|
import './main';
|
||||||
|
import './index/';
|
||||||
|
import './create';
|
||||||
|
import './search-panel';
|
|
@ -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
|
||||||
|
});
|
|
@ -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')
|
||||||
|
});
|
Loading…
Reference in New Issue
Cambiar a nueva versión