-
Notifications
You must be signed in to change notification settings - Fork 21
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
enh(API): add OCS API to create rows #1161
Conversation
…perms Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
3b3de09
to
0b5d245
Compare
Just realized, there is a good number of added lines. But worry not:
|
66cae89
to
e69e065
Compare
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
e69e065
to
e25e7c0
Compare
One set of failing tests were about gracefullness – fixed. The other, because in 26 there is no |
btw,
would only do as follow up, if only to not make this PR bigger |
Yes, makes sense to line up for implementation I'd say, but let's keep this separate. |
} | ||
} | ||
return true; |
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.
Is there a use case for returning true in the assert-Methods if we throw anways in case of no permission?
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.
Otherwise I could not chain them in the match block: https://github.com/nextcloud/tables/pull/1161/files#diff-58a7c8ba568eef76405b8471729c4b735def0967160958d5ab0105ddb7afb34eR109-R112
could turn it into switch construction instead of course. I find the match more compact and readable.
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.
Ah ok, that makes sense then 👍
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.
Cool, just a non-blocking question 👍
solves #1105
also features
✨ completed and flexible PermissionMiddleware
✨ integration tests of new endpoint against both tables and views, owners and sharees, negative tests
✨ the advertised new OCS endpoint for creating rows
✨ helper model to avoid a loose array with set or not set keys flying around
✨ simple conversion helper to translate stringy node types to ints and other way around
Open question: should I create endpoints for all other row-related methods as well? Would make sense, this feels incomplete. Can do a follow up as well of course.