Comment 1 for bug 786835

Revision history for this message
Matt Giuca (mgiuca) wrote :

Does anyone have any ideas on how the client can figure out whether the user is authorized to edit or not? I don't think the client has access to any authz information like that at all, which makes it pretty hard.

(After all, that's the whole problem why we are letting people into the +edit pages even if they don't have permission -- we can't detect whether or not they have permission until they try to edit something.)

I'm wondering if we should / can add a field to the User, DevTeam and Game objects (just the client objects, not the *Data versions) called userCanEdit : Boolean, which indicates whether the user has edit permissions. Then we can use that to determine whether to display the "edit" links, as well as whether to show an error if the user visits the +edit page. Does that sound feasible?