-
Notifications
You must be signed in to change notification settings - Fork 159
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
refactor: remove aggregateResourceShares and share prop on share resources #10426
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
const res = unref(resource) | ||
if (isShareResource(res) && res.share?.role) { | ||
return res.share.role.hasPermission(SharePermissions.update) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File versions currently can't be loaded for shares (including files inside a shared folder), so this check is not needed at the moment. If needed later it should check the graph permissions instead.
3443f1c
to
8fcd572
Compare
c5c86f8
to
428af50
Compare
Removes the `share` property on `ShareResource` because a) there is no need to expose the full share on a resource and b) a `ShareResource` can "hold" multiple shares, rendering that property useless.
428af50
to
28f4542
Compare
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 16 New issues |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crazy 😍
Description
aggregateResourceShares
because we don't need it anymore. The proper way to build share resources is viabuildIncomingShareResource
andbuildOutgoingShareResource
.share
property onShareResource
because a) there is no need to expose the full share on a resource and b) aShareResource
can "hold" multiple shares, rendering that property basically useless.Related Issue
Types of changes