Setting Gear Permissions
Introduction
By default, gears can be used by any user site-wide. However, Site Administrators or Site Developers can limit gear access to designated users, projects, or groups. Learn more about the impact of gear permissions.
A site admin or site developer can update the permissions of a specific gear. Permissions are set at the group, project, or user level. Combinations and multiples are allowed. A permission of None
will result in site-wide permissions, and is the default when a gear is first loaded.
Site Administrators or Gear Developers can set Gear permissions using the following functions in the the Flywheel Python SDK.
Instruction Steps
In these examples "awesome-gear" is an example gear name. "user@flywheel.io" is an example user id, "623b89fff383de7494a88e66" is an example project id, and "research" is an example group id.
- Check existing permissions on the gear
- Assign “awesome-gear” access to “user@flywheel.io”
- Remove any restrictions on the gear, setting the gear permissions to default(None)
- Add another user to the “awesome-gear”
- For group level and project level permissions, the same commands apply, but the input becomes:
fw.replace_gear_permission("awesome-gear", "users", {"id":"user@flywheel.io"}, "group", {"id":"research")
- To remove all permissions and make a gear inaccessible by users, provide empty lists: