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