You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all. I think there is a very important use case that is not addressed by this lbry, how can one discriminate which user can vote? In my case, I need to make sure only users with a "certificate" can vote on the course rating (other users haven't taken the course, they shouldn't be able to vote). How can I achieve that, the template tag doesn't receive any useful argument for this. There is an editable template variable but no docs on how/where to set it to false.
The text was updated successfully, but these errors were encountered:
Thanks for the report, that does sound like a useful feature to add.
I think it could be answered a couple of ways, either via overriding editable in the template to check for a permission, or perhaps a more generic solution would be to amend how editable is used within ratings.py
Adding a variable along the lines of STAR_RATINGS_PERMISSIONS_CHECK to allow users to specify a path to a function that takes a user and checks permissions (falling back to is_authenticated).
If this is something you are looking into we'd be happy to accept a PR.
Hi all. I think there is a very important use case that is not addressed by this lbry, how can one discriminate which user can vote? In my case, I need to make sure only users with a "certificate" can vote on the course rating (other users haven't taken the course, they shouldn't be able to vote). How can I achieve that, the template tag doesn't receive any useful argument for this. There is an
editable
template variable but no docs on how/where to set it to false.The text was updated successfully, but these errors were encountered: