parent
e6e5e077bd
commit
de91b57825
|
@ -57,6 +57,11 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void) setUid: (NSString *) _uid
|
||||
{
|
||||
ASSIGNCOPY (self->uid, _uid);
|
||||
}
|
||||
|
||||
- (NSString *) uid
|
||||
{
|
||||
return uid;
|
||||
|
|
|
@ -124,7 +124,7 @@
|
|||
|
||||
if ([currentValue isEqualToString: @"None"])
|
||||
[self removeAllRightsFromList: rightsForType];
|
||||
else
|
||||
else if ([rightsForType containsObject: currentValue])
|
||||
[self appendExclusiveRight: [NSString stringWithFormat: @"%@%@",
|
||||
currentType, currentValue]
|
||||
fromList: rightsForType];
|
||||
|
|
|
@ -554,7 +554,7 @@
|
|||
</div>
|
||||
</script>
|
||||
|
||||
<!-- modal for addressbook sharing options -->
|
||||
<!-- modal inner content for acl editor -->
|
||||
<script type="text/ng-template" id="UIxUserRightsEditor">
|
||||
<var:component className="UIxContactsUserRightsEditor" />
|
||||
</script>
|
||||
|
|
|
@ -583,6 +583,11 @@
|
|||
<var:component className="UIxCalUserRightsEditor" />
|
||||
</script>
|
||||
|
||||
<!-- modal inner content for anonymous acl editor -->
|
||||
<script type="text/ng-template" id="UIxAnonymousUserRightsEditor">
|
||||
<var:component className="UIxCalUserRightsEditor" const:uid="anonymous" />
|
||||
</script>
|
||||
|
||||
<!-- modal for calendar import -->
|
||||
<script type="text/ng-template" id="UIxCalendarImportDialog">
|
||||
<md-dialog flex="40" flex-xs="100" label:aria-label="Import Calendar">
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
<var:string label:value="Subscribe User"/>
|
||||
</md-checkbox>
|
||||
</var:if>
|
||||
<div ng-include="'UIxUserRightsEditor'">
|
||||
<div ng-include="acl.templateName(user)">
|
||||
<!--
|
||||
Load ng-template #UIxUserRightsEditor from main module wox. Inner wox templates are:
|
||||
- UI/Templates/ContactsUI/UIxContactsUserRightsEditor.wox
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
AclController.$inject = ['$timeout', '$mdDialog', 'Dialog', 'usersWithACL', 'User', 'folder'];
|
||||
function AclController($timeout, $mdDialog, Dialog, usersWithACL, User, folder) {
|
||||
AclController.$inject = ['$document', '$timeout', '$mdDialog', 'Dialog', 'usersWithACL', 'User', 'folder'];
|
||||
function AclController($document, $timeout, $mdDialog, Dialog, usersWithACL, User, folder) {
|
||||
var vm = this;
|
||||
|
||||
vm.users = usersWithACL; // ACL users
|
||||
|
@ -16,6 +16,7 @@
|
|||
vm.selectedUid = null;
|
||||
vm.userToAdd = '';
|
||||
vm.searchText = '';
|
||||
vm.templateName = templateName;
|
||||
vm.userFilter = userFilter;
|
||||
vm.closeModal = closeModal;
|
||||
vm.saveModal = saveModal;
|
||||
|
@ -28,6 +29,12 @@
|
|||
vm.confirmation = { showing: false,
|
||||
message: ''};
|
||||
|
||||
function templateName(user) {
|
||||
// Check if user is anonymous and if a specific template must be used
|
||||
var isAnonymous = $document[0].getElementById('UIxAnonymousUserRightsEditor') && user.$isAnonymous();
|
||||
return 'UIx' + (isAnonymous? 'Anonymous' : '') + 'UserRightsEditor';
|
||||
}
|
||||
|
||||
function userFilter($query) {
|
||||
return User.$filter($query, folder.$acl.users);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue