-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Shares] New endpoint that announces (sharing) roles for clients #4848
Comments
For the iOS SDK, I used I ended up with this list of roles: https://github.com/owncloud/ios-sdk/blob/feature/graph-api/ownCloudSDK/Core/Sharing/OCCore%2BSharing.m#L360 They can all be described with these properties:
What I imagine an API to look like: General properties
Actual APIOne endpoint allowing two different types of query:
That moves the logic which roles are available for which item entirely to the server. Client usageClients can use the result of the
a) comparing share Alternative:
|
@michaelstingl @felix-schwarz Thanks for the writeup. The sharing roles and permissions should be maintained by the backend and are different per space. That is already the case today. A IMO we need unique identifiers per sharing role. The bitmask will completely disappear because we do not have a 1:1 relationship between bitmask and a role anymore. |
already on the (still raw) list
|
I just added
Yeah, I noticed the bitmask values are different depending on file/folder/space. Ok. Until then, is there documentation available describing the current sharing API? (especially regarding changes from OC10's) |
This is a different topic. The point here is to allow the clients to retrieve the available roles in sharing from the server in order to avoid hardcoding them in every client. Agree that it is a post-GA topic. It should be tackled together with enabling sharing on the native clients. |
highlevel meeting:
|
@felix-schwarz would it help to expose what we currently have in |
After a deep dive into the ms graph That being said, neither concept is the right thing to misuse for sharing roles. I'd still prefer to have a graph API endpoint that extends the concept of the ms graph sharing roles property as defined in https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0#properties as
So, actually I propose building on top of this api by introducing a new If this endpoint does not exist or does not respond, clients can fall back to a hardcoded set or just display custom permissions. When the list of |
hm then again, the sharingRoles might be specific to an application, eg collabora, onlyoffice in addition to the ocis internal permissions. so we may also need an
Two problems:
🤔 |
@michaelstingl At least for the iOS client, I see no benefit in having the information from Better to focus on a stable API. Given that the iOS SDK's internal implementation of this is just around ~200 lines of code - with most of these lines spent on all the role definitions - I imagine the effort/time needed for an initial server-side implementation of what I outlined above should be relatively small. One thing that we haven't discussed yet, however, is what clients should do when connecting to an OC 10 server. If clients should offer the same, role-based UI for these, I see two possibilities:
|
No changes planned in oC10. They'll keep the bitmask implementation. When oC10 changes, then they should add the new endpoint too. |
In order to extend the ms graph resources with our concepts, eg. to use permission ids instead of Similar to Directory extensions libregraph properties we introduce should be prefixed with @micbar a Discarded ideas:Directory ExtensionsThey cannot be registered on Use any other of the original four ways to extend ms graphEach extension can only be applied to specific resource types. In this case Odata Instance AnnotationsThe example shows that annotations really are meant to add data outside the scope of the actual resource, like influencing rendering:
Dot or colon separated prefixUsing a prefix like |
odata supports localization via the The RFC recommends not to return a |
We have https://owncloud.dev/libre-graph-api/#/roleManagement now so I guess this can be closed. |
oCIS comes with a new, roles-based sharing concept. It would be beneficial, if clients wouldn't need to hardcode the different roles and permissions, but instead could request them from the backend, to also support future changes. (new, dynamic roles?)
Hardcoded example from ownCloud web:
https://github.com/owncloud/web/blob/master/packages/web-client/src/helpers/share/role.ts
For inspiration, maybe check the oC10 implementation for roles-based public links:
/cc @TheOneRing @felix-schwarz @kulmann @micbar @tbsbdr @pmaier1
The text was updated successfully, but these errors were encountered: