davis
davis copied to clipboard
ACL Privileges for read-only user
Hi, how to can assign read-only permission in one user to consult default with uri adressbook other user?
Regards
Hi I'm not sure that this is possible in sabre/dav at the moment, but if you have any info that it is, please share so I can have a look
Hi @tchapi,
Let me explain what I want to do:
I currently have a CardDav server that I have implemented based on your Davis project, I have created an admin user with d:all permissions (isAdmin), now I would need to create another read-only user (d:read) to use the admin user's address book or a new one, but read-only.
Currently, accessing with the user (not admin and not adressbook owner) I get this error:

How could I implement read permissions (d:read) to a user? I can touch the code of the project, but I don't know very well where it assigns those permissions?
Regards
I understand what you want to do, but the underlying sabre/dav library does not support it (yet?). There are some issues about it (like https://github.com/sabre-io/dav/issues/1052) on their repo.
I'm not sure that it's easy to implement, but if you want to give it a try ...
Might be related: #105
Maybe a strange question, but has this feature already been developed? I understand the basics of ticket https://github.com/sabre-io/dav/issues/1052#issuecomment-831679747 that you should return 403 error when user is not allowed to edit. Seems like a workable solution? Can you give a detailed explanation of how I should implement read only state in your code?
It hasn't, as far as I know; But I'm a bit wary of touching permission-related code in Davis (rather than in sabre/dav, where it should be implemented) as it's generally laborious (see https://github.com/tchapi/davis/pull/105 on a different subject, it's a pain to have it working, circumventing the limitations of sabre/dav).
I have not looked at the proposed workaround tbh and it's not likely I will have the time to do so, but please feel free to submit something and we can have a look from there.
@djanpy 👋🏼 Now that #105 is merged and released, does it fix your original issue?