mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
delete space, mov doc edge cases
This commit is contained in:
parent
5481de4e1c
commit
8d761da939
11 changed files with 117 additions and 125 deletions
|
@ -22,7 +22,7 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
},
|
||||
|
||||
model() {
|
||||
return this.get('folderService').getAll();
|
||||
return this.get('folderService').adminList();
|
||||
},
|
||||
|
||||
setupController(controller, model) {
|
||||
|
@ -30,33 +30,12 @@ export default Ember.Route.extend(AuthenticatedRouteMixin, {
|
|||
if (is.empty(nonPrivateFolders) || is.null(model) || is.undefined(model)) {
|
||||
nonPrivateFolders = [];
|
||||
}
|
||||
|
||||
controller.set('folders', nonPrivateFolders);
|
||||
|
||||
this.get('folderService').getProtectedFolderInfo().then((people) => {
|
||||
people.forEach((person) => {
|
||||
person.set('isEveryone', person.get('userId') === '');
|
||||
person.set('isOwner', false);
|
||||
});
|
||||
|
||||
nonPrivateFolders.forEach(function (folder) {
|
||||
let shared = people.filterBy('folderId', folder.get('id'));
|
||||
let person = shared.findBy('userId', folder.get('userId'));
|
||||
if (is.not.undefined(person)) {
|
||||
person.set('isOwner', true);
|
||||
}
|
||||
|
||||
folder.set('sharedWith', shared);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
activate() {
|
||||
document.title = "Spaces | Documize";
|
||||
},
|
||||
|
||||
actions: {
|
||||
onChangeOwner() {
|
||||
this.refresh();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue