Skip to content

Roles as string in client methods #265

@harminius

Description

@harminius

Recently, several client methods for user management were introduced.

Some of these methods expect a role (project / workspace) as an argument. (Unfortunatelly,) the type of the role argument is expected to be a member of the Enum (WorkspaceRole) defined elsewhere. That's might be quite inconvienient for some users. It'd be more friendly if it could accept the role argument as a string, too (role="writer").

We need to keep the public methods compatible with the already published version, so it must work for both - string as well as WorkspaceRole enum.

E.g. https://github.com/MerginMaps/python-api-client/blob/master/mergin/client.py#L1304

In docs we already claim that the argument is a string.. 🙈 So we might mention the other option there, or keep it secret. https://merginmaps.com/docs/dev/integration/#create-a-user

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions