-
Notifications
You must be signed in to change notification settings - Fork 13
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
RoleMixin needs to accept principals and anchors #156
Comments
We have now introduced some ambiguity over what happens when there is more than one principal in a request. This can happen in two situations:
There is only one active user principal in the first and second cases, and no conflicting principal in the third case, so there's no ambiguity over what happens when |
Concern 3 (principal+anchor) can be addressed by accepting both and adding the roles, since roles are always additive. |
Clarified in hasgeek/lastuser#91 (comment): principals with agency may be explicitly recognised as "actor" or "agent". |
Actor+agent introduced in 8e6232d. If we combine scenarios 1 and 2 above (user using a native app and sudoing into another user's account), we now have two agents: the commanding user, and the client app. Where is the scope for handling two agents? Should "agent" be explicitly classified into "client" and "sudoer" here? |
Since there is no foreseen use case for roles granted to agents, should we not bother with them in RoleMixin? They will still exist in Also, given the availability of |
RoleMixin currently accepts
user
andtoken
parameters. While currently unused,token
was supposed to represent a constraint on, or transfer of a user's roles.We have since redefined a user as a "principal" that has the property of "agency" (shared with the "client" principal). This is defined in hasgeek/lastuser#91. The parameter name should change to indicate this.
We also have a new abstract concept, an "anchor" that allows us to infer a principal without explicitly requiring one. Inbound anchors, for example a browser session or a secret URL (as used in Boxoffice and previously in Hasjob) allow us to confer roles without needing a user or principal. Tokens are a form of inbound anchor.
RoleMixin should rename its parameters to
principal
andanchor
, and Coaster should perhaps define base classes for the expected sorts of anchors.The text was updated successfully, but these errors were encountered: