1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-02 20:15:26 +02:00

new permission endpoint

WIP
This commit is contained in:
Harvey Kandola 2017-09-14 12:54:57 +01:00
parent ae05cacf3f
commit 5f7c6d211f
32 changed files with 334 additions and 249 deletions

View file

@ -11,13 +11,12 @@
import Model from 'ember-data/model';
import attr from 'ember-data/attr';
// import { belongsTo, hasMany } from 'ember-data/relationships';
import { belongsTo } from 'ember-data/relationships';
export default Model.extend({
orgId: attr('string'),
folderId: attr('string'),
userId: attr('string'),
fullname: attr('string'),
canView: attr('boolean', { defaultValue: false }),
canEdit: attr('boolean', { defaultValue: false })
permissions: belongsTo('space-permission')
});

View file

@ -15,10 +15,17 @@ import attr from 'ember-data/attr';
export default Model.extend({
orgId: attr('string'),
who: attr('string'),
whoId: attr('string'),
action: attr('string'),
scope: attr('string'),
location: attr('string'),
refId: attr('string')
folderId: attr('string'),
userId: attr('string'),
fullname: attr('string'), // client-side usage only, not from API
spaceView: attr('boolean'),
spaceManage: attr('boolean'),
spaceOwner: attr('boolean'),
documentAdd: attr('boolean'),
documentEdit: attr('boolean'),
documentDelete: attr('boolean'),
documentMove: attr('boolean'),
documentCopy: attr('boolean'),
documentTemplate: attr('boolean')
});