mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Rename document role to permission
This commit is contained in:
parent
93b95b9eca
commit
ad3f406876
5 changed files with 9 additions and 14 deletions
|
@ -17,7 +17,6 @@ import ModalMixin from '../../mixins/modal';
|
|||
import Component from '@ember/component';
|
||||
|
||||
export default Component.extend(ModalMixin, TooltipMixin, {
|
||||
// userService: service('user'),
|
||||
spaceSvc: service('folder'),
|
||||
groupSvc: service('group'),
|
||||
categorySvc: service('category'),
|
||||
|
|
|
@ -15,11 +15,11 @@ import attr from 'ember-data/attr';
|
|||
export default Model.extend({
|
||||
orgId: attr('string'),
|
||||
documentId: attr('string'),
|
||||
userId: attr('string'),
|
||||
fullname: attr('string'), // client-side usage only, not from API
|
||||
|
||||
documentEdit: attr('boolean'), // space level setting
|
||||
documentApprove: attr('boolean'), // space level setting
|
||||
documentRoleEdit: attr('boolean'), // document level setting
|
||||
documentRoleApprove: attr('boolean') // document level setting
|
||||
whoId: attr('string'),
|
||||
who: attr('string'),
|
||||
name: attr('string'),
|
||||
documentEdit: attr('boolean'),
|
||||
documentApprove: attr('boolean'),
|
||||
documentRoleEdit: attr('boolean'),
|
||||
documentRoleApprove: attr('boolean')
|
||||
});
|
|
@ -4,7 +4,7 @@ export default ApplicationSerializer.extend({
|
|||
normalize(modelClass, resourceHash) {
|
||||
return {
|
||||
data: {
|
||||
id: resourceHash.userId ? resourceHash.userId : 0,
|
||||
id: resourceHash.whoId ? resourceHash.whoId : 0,
|
||||
type: modelClass.modelName,
|
||||
attributes: resourceHash
|
||||
}
|
|
@ -343,7 +343,7 @@ export default Service.extend({
|
|||
perms = this.get('store').push(perms);
|
||||
this.get('folderService').set('permissions', perms);
|
||||
|
||||
let roles = this.get('store').normalize('document-role', response.roles);
|
||||
let roles = this.get('store').normalize('document-permission', response.roles);
|
||||
roles = this.get('store').push(roles);
|
||||
|
||||
let folders = response.folders.map((obj) => {
|
||||
|
|
|
@ -97,10 +97,6 @@ func RegisterEndpoints(rt *env.Runtime, s *domain.Store) {
|
|||
Add(rt, RoutePrefixPrivate, "documents/{documentID}", []string{"GET", "OPTIONS"}, nil, document.Get)
|
||||
Add(rt, RoutePrefixPrivate, "documents/{documentID}", []string{"PUT", "OPTIONS"}, nil, document.Update)
|
||||
Add(rt, RoutePrefixPrivate, "documents/{documentID}", []string{"DELETE", "OPTIONS"}, nil, document.Delete)
|
||||
// Add(rt, RoutePrefixPrivate, "documents/{documentID}/permissions", []string{"GET", "OPTIONS"}, nil, permission.GetDocumentPermissions)
|
||||
// Add(rt, RoutePrefixPrivate, "documents/{documentID}/permissions", []string{"PUT", "OPTIONS"}, nil, permission.SetDocumentPermissions)
|
||||
// Add(rt, RoutePrefixPrivate, "documents/{documentID}/permissions/user", []string{"GET", "OPTIONS"}, nil, permission.GetUserDocumentPermissions)
|
||||
|
||||
Add(rt, RoutePrefixPrivate, "documents/{documentID}/pages/level", []string{"POST", "OPTIONS"}, nil, page.ChangePageLevel)
|
||||
Add(rt, RoutePrefixPrivate, "documents/{documentID}/pages/sequence", []string{"POST", "OPTIONS"}, nil, page.ChangePageSequence)
|
||||
Add(rt, RoutePrefixPrivate, "documents/{documentID}/pages/{pageID}/revisions", []string{"GET", "OPTIONS"}, nil, page.GetRevisions)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue