(js) Respect super user creation privilege

This commit is contained in:
Francis Lachapelle
2016-03-10 09:18:39 -05:00
parent c8634c8596
commit 819851bb92
3 changed files with 5 additions and 2 deletions

1
NEWS
View File

@@ -8,6 +8,7 @@ Bug fixes
- [web] fixed missing columns in SELECT statements (PostgreSQL)
- [web] fixed display of ghosts when dragging events
- [web] fixed management of mail labels in Preferences module
- [web] respect super user privileges to create in any calendar and addressbook
3.0.2 (2016-03-04)
------------------

View File

@@ -426,7 +426,7 @@
</div>
<md-button class="md-fab md-fab-bottom-right md-accent"
label:aria-label="New Contact"
ng-show="addressbook.selectedFolder.acls.objectCreator"
ng-show="addressbook.selectedFolder.isOwned || addressbook.selectedFolder.acls.objectCreator"
ng-click="addressbook.newComponent($event)">
<md-icon>add</md-icon>
</md-button>

View File

@@ -135,7 +135,9 @@
}
if (writable) {
return _.union(this.$calendars, _.filter(this.$subscriptions, function(calendar) { return calendar.acls.objectCreator; }));
return _.union(this.$calendars, _.filter(this.$subscriptions, function(calendar) {
return calendar.isOwned || calendar.acls.objectCreator;
}));
}
return _.union(this.$calendars, this.$subscriptions, this.$webcalendars);