Interface for determining if a object is restricted could be better

Bug #1006155 reported by Timothy R. Chavez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
django-group-access
New
Undecided
Unassigned

Bug Description

I'm currently using object.access_groups.count() to determine if access to 'object' is restricted. In other words, if an AccessGroup was added to the object then it is restricted. Would creating some static method on AccessGroup make the interface cleaner? For example, AccessGroup.is_restricted(object) would return a boolean and more importantly, if the object has an implied restriction due to some sort of relationship, is_restricted() would be able to determine it via the 'control_relation'.

description: updated
description: updated
Revision history for this message
Timothy R. Chavez (timrchavez) wrote :

I changed to using exists() rather than count() but the interface could still be a bit better.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.