Skip to content

Add public_collaborator_role to project create and patch - #119

Merged
manylon merged 1 commit into
masterfrom
QF-8882-add-public-collaborator-role-support
Oct 19, 2026
Merged

manylon merged 1 commit into
masterfrom
QF-8882-add-public-collaborator-role-support

Conversation

@manylon

@manylon manylon commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow up on:

The server now accepts public_collaborator_role on /api/v1/projects/, which sets the role every user gets while a project is public. SDK and CLI users can set it when creating or patching a project, and the CLI project table shows it.

  • add public_collaborator_role to Client.create_project and Client.patch_project
  • add --public-collaborator-role to create-project and patch-project, limited to reader, reporter and editor
  • add a PUBLIC ROLE column to format_project_table, blank when the server does not return the field
Listing projects…
Projects the current user has access to:
| ID                                   | OWNER/NAME                               | IS PUBLIC | PUBLIC ROLE | PROJECT TYPE    | DESCRIPTION                   |
---------------------------------------------------------------------------------------------------------------------------------------------------------------
| f123c230-2d9f-4fad-84e6-eb1243555a99 | manylon/Nica_adventures                  | 0         |             | regular         |                               |
| 7207a1d6-f0c5-42ef-93b9-8dca3f27ccbe | manylon/shared_datasets                  | 0         |             | shared_datasets |                               |
| 76c5b851-efba-477e-8aa0-a7d61f7adde4 | org_01/Fiamma_rock_needle_routes         | 1         | reader      | regular         | Climbing routes for La Fiamma |

Fixes #117

The server now accepts `public_collaborator_role` on
`/api/v1/projects/`, which sets the role every user gets while a
project is public. SDK and CLI users can set it when creating or
patching a project, and the CLI project table shows it.

- add `public_collaborator_role` to `Client.create_project` and
  `Client.patch_project`
- add `--public-collaborator-role` to `create-project` and
  `patch-project`, limited to `reader`, `reporter` and `editor`
- add a `PUBLIC ROLE` column to `format_project_table`, blank when
  the server does not return the field
Comment thread qfieldcloud_sdk/utils.py

@Rakanhf Rakanhf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🚀

@manylon
manylon merged commit 44b0d5f into master Oct 19, 2026
9 checks passed
@manylon
manylon deleted the QF-8882-add-public-collaborator-role-support branch October 19, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add public_collaborator_role parameter within the create and patch project functions

2 participants