-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check addressbook permission before moving #297
Conversation
db6abc0
to
86a221b
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
86a221b
to
8e2d679
Compare
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
- Coverage 14.82% 14.73% -0.09%
==========================================
Files 55 55
Lines 1221 1228 +7
==========================================
Hits 181 181
- Misses 1040 1047 +7
Continue to review full report at Codecov.
|
60a7a56
to
69f8dbe
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
69f8dbe
to
60cc140
Compare
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
js/services/contact_service.js
Outdated
@@ -251,6 +251,10 @@ angular.module('contactsApp') | |||
if (contact.addressBookId === addressbook.displayName) { | |||
return; | |||
} | |||
if(addressbook.readOnly) { | |||
OC.Notification.showTemporary(t('contacts', 'You don\'t have permission to write to this addressbook.')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be 'You don't have permission to write to this addressbook.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's exactly what it's written. 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're talking about the \'
it's to escape the ' character since we're using it to define the string. :)
@@ -1620,6 +1620,7 @@ var listAddressBooks = _co2['default'].wrap(regeneratorRuntime.mark(function cal | |||
req = request.propfind({ | |||
props: [{ name: 'displayname', namespace: ns.DAV }, { name: 'owner', namespace: ns.DAV }, { name: 'getctag', namespace: ns.CALENDAR_SERVER }, { name: 'resourcetype', namespace: ns.DAV }, { name: 'sync-token', namespace: ns.DAV }, | |||
//{ name: 'groups', namespace: ns.OC }, | |||
{ name: 'read-only', namespace: ns.OC }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the only line I changed on this file, the rest is just Github failing to see I didn't changed anything else.... 😑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is compiled code. I'm quite sure you shouldn't change it here, but in js/dav/lib/contacts.js
and then run make
in js/dav
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you're right! :O
In case if the default addressbook is in read only mode Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Works and is ok for now - we need to push a new release 👍 |
@irgendwie look #294 too :) |
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Fix unfinished edit for the dav lib, see #297
Fix #174
Testing: