From 742f175872cb3150fb66473d3cd9274abf7c4d14 Mon Sep 17 00:00:00 2001 From: Thomas Tanghus Date: Thu, 6 Sep 2012 01:48:30 +0200 Subject: [PATCH] Disable editing shared calendars name. --- js/settings.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/settings.js b/js/settings.js index 8491e672..d02a26e4 100644 --- a/js/settings.js +++ b/js/settings.js @@ -47,7 +47,12 @@ OC.Contacts.Settings = OC.Contacts.Settings || { }, doEdit:function(id) { console.log('doEdit: ', id); - this.showActions(['active', 'name', 'description', 'save', 'cancel']); + var owner = this.adrsettings.find('[data-id="'+id+'"]').data('owner'); + var actions = ['active', 'description', 'save', 'cancel']; + if(owner == OC.currentUser) { + actions.push('name'); + } + this.showActions(actions); var name = this.adrsettings.find('[data-id="'+id+'"]').find('.name').text(); var description = this.adrsettings.find('[data-id="'+id+'"]').find('.description').text(); var active = this.adrsettings.find('[data-id="'+id+'"]').find(':checkbox').is(':checked');