Skip to content
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 permissions when linking read only fields #9

Open
cript0nauta opened this issue Mar 9, 2015 · 1 comment
Open

Check permissions when linking read only fields #9

cript0nauta opened this issue Mar 9, 2015 · 1 comment

Comments

@cript0nauta
Copy link

Hi, I'm using the feature of relatives of making a link to the object when the foreigkey field is read only. It would be great to check if the user has permissions to edit that object, else show the content of the field without the link to avoid unathorized errors. I tried to do that myself but i didn't know how. Could you help me?

@treyhunner
Copy link
Owner

The file you'll want to change/override is relatives/templates/relatives/includes/fieldset.html. Start by copying the version in django-relatives.

I haven't used Django's permission system much so I'm not entirely sure how to check whether the user has permission to edit that object. The documentation for permissions might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants