ACL: check user has access to current workspace
[ Feature description ]
The user must whether:
- has a direct permission accessLevel for this repository ;
- be a member of a group with such a permission.
The permission flag must be greater than 0.
IF this isn't satisfied, the access is denied.
[ Core libraries changes ]
- New method: Workspace::userCanAccess (User $user) Determines if the specified user has access to the current workspace.
- User:get_workspaces() keeps the result cached in class private User::$workspaces property.
[ Notes ]
- A coming commit will convert underscore method names to camelCase ones.
- The permission flag is intended to be 0, 1 or 2:
- 0: access revoked or suspended
- 1: regular access, with the possibility to specific rights by other permissions
- 2: workspace system administrator access
The only technical enforcement done is > 0.