-
Notifications
You must be signed in to change notification settings - Fork 119
[WIP] Added function to get share info #69
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
Conversation
|
|
Failures I've got while running tests of this branch http://paste.debian.net/348550/ |
|
OK the 403 errors where returned because share user in target server wasn't created. Two problems here:
|
|
Now failing owncloud/test/test.py::TestFileAccess::test_rename_unicode |
|
Apart from the failing test 👍 |
|
Hmm, needs rebase due to conflicts |
ee38195 to
d0ad2c3
Compare
|
Rebased. |
|
Github still says it has conflicts. Make sure you pulled/fetched master before rebasing. |
d0ad2c3 to
d84162d
Compare
|
Yes, last merge added a new one. Rebased again. |
|
We might also want to change @SergioBertolinSG what do you think ? |
|
I've searched smashbox and there is no use of the method get_shares there. Yes I think it is better to return instances. |
|
@PVince81 please review. I guess oc 7 fail with test_share_with_group can be addressed in an upcoming PR. |
|
These smashbox tests will need some changes. Better to change them or make share_id a public field? |
|
Yeah, make share id a public field. Could be useful in other cases. |
owncloud/owncloud.py
Outdated
| return value | ||
| except: | ||
| return None | ||
|
|
||
| class PublicShare(): |
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.
should this extend ShareInfo ?
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.
They can be removed (UserShare and PublicShare). Is that a bad option?
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.
We can remove UserShare.
But we cannot remove PublicShare because it exists since v0.1, that would break existing API.
This, unless ShareInfo's API is compatible. Goal is to not break scripts that were using v0.1.
|
Code looks good otherwise 😄 |
|
@PVince81 please review. |
owncloud/owncloud.py
Outdated
| return "UserShare(id=%i,path='%s',perms=%s)" % \ | ||
| (self.share_id, self.share, self.perms) | ||
|
|
||
|
|
||
| class GroupShare(): |
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.
Remove GroupShare too ?
For some reason I don't see its usage on your branch, but I see it here https://github.com/owncloud/pyocclient/blob/master/owncloud/owncloud.py#L1212
You might need to rebase onto master to get this recently merged functionality
066ba6b to
101ed37
Compare
* Added internal function __get_shareinfo() - will be used repeatedly
101ed37 to
8929bad
Compare
|
@PVince81 Tests passing. |
|
Please check if smashbox can still run against this branch, if yes then good to go 👍 |
|
Smashbox sharing tests are working now. |
|
👍 |
[WIP] Added function to get share info
Follow up of #63
Remaining tasks: