-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add OCS sharing info to capabilities - take 2 #13964
Conversation
public function getCaps() { | ||
$res = array(); | ||
|
||
$public = false; |
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.
@LukasReschke in reply to your comments on the previous PR.
I did it like this to have the json return format make a bit more sense. So it is false if public sharing is disabled. And an array if not. The same is done for the expire_date.
Another, maybe more elegant solution is to have an enabled element in the array. So that the format is always the same.
cc @PVince81 @LukasReschke @DeepDiver1975 Could you have another look at this? Would be nice to be able to allow checking for this in the client(s). |
@@ -0,0 +1,87 @@ | |||
<?php | |||
/** | |||
* @author Not Committed Yet <not.committed.yet> |
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.
Accidental leftover?
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 you are right.
Fixed.
@DeepDiver1975 should this be moved to the OCS Sharing API as discussed on IRC ? (instead of the capabilities) |
Well - I had a chat with @dragotin and he actually likes the idea to have one call to get all capabilities instead of calling multiple apis .... |
@rullzer this pr by itself looks good - we finally have to decide on how to move on ... |
@DeepDiver1975 small reminder: one issue remains is that if we use the app framework for getcapabilities in the future it won't be possible to combine responses from multiple apps that respond to the same call. (which I believe is one of the reason this discussion started) |
Display the capabilities regarding file sharing in the capabilities API. This will allow the clients to provide users a better experince.
This change allows for more generic parsing for the capabilities.
* @param string[] $data Capabilities | ||
* @return string[] | ||
*/ | ||
function getFilesSharingPart(array $data) { |
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.
public, protected or private
A new inspection was created. |
Refer to this link for build results (access rights to CI server needed): |
@DeepDiver1975 @PVince81 how to we want to proceed here? As I would really like to have a feature like this in 8.1 so the client can provide a better UX. |
I like the idea of the capabilities manager |
PR for Capabilities manager is in #15093 . Once that is in place adding the capabilities here should be a bit nicer. |
@DeepDiver1975 yes, please give this a priority, as it blocks functionality in the client. Would be great :-) |
The capabilities manager is for sure a nicer approach - but we simply cannot use it yet on the ocs/v1.php endpoint. 👍 for moving on using the current ocs approach |
@DeepDiver1975 well the code is rather easy to understand. So it would be not to hard to move this capabilities class also to the capabilities manager for 8.2. So one more +1 and I can make the users of the client a bit happier ;) |
@MorrisJobke @nickvergessen please review - thx |
Tested 👍 |
Add OCS sharing info to capabilities - take 2
Before:
After:
Command:
|
Looks very sufficient 👍 |
@carlaschroder I guess we have to update the api docs on this - THX |
Since the previous request was already merged (which was a bit to soon). Here is another take. It is still a patch for #13673.