Details
-
Suggestion
-
Resolution: Won't Do
Description
When a Connect add-on renders an iframe in the repository overview page via a webPanel module, it would be useful to know the current user's level of access to that repository so that the appropriate content can be shown.
One convenient way to do this would be to add a new context parameter called something like user_repo_access or user_permission to the existing set of context parameters, some of which are already specific to repositories. The value of this parameter would be one of the permission levels currently checked by the has_permission condition, i.e. read, write, or admin.
Even if the user's access to the repo can be obtained via a REST call, exposing it as a context parameter would:
- be much more convenient for add-on developers,
- make add-ons much more performant and robust at runtime due to fewer network calls, and
- reduce the load on the REST API server.