Skip to content
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

User group sharing #4055

Merged
merged 9 commits into from
Nov 6, 2015
Merged

User group sharing #4055

merged 9 commits into from
Nov 6, 2015

Conversation

rullzer
Copy link
Contributor

@rullzer rullzer commented Nov 1, 2015

For #3737

With the new sharing and OCS code in place this was a lot easier to write. Not really finished yet. But sharing with user/groups works!

There is still a lot of stuff that needs to be connected in the dialog.
The code needs comments. And more cleanup.

But overall it is looking promising :)

TODO:

  • Comments
  • Only allow this on >8.2 servers (Sharee API)
  • Connect lots of stuff in the dialog
  • Cleanup sharee stuff
  • Better UI

For the last point I think it is best if someone with more estethic taste has a look once this is merged ;)

Now time for bed.

@MTRichards FYI
CC: @dragotin @ckamm @ogoffart @guruz

@rullzer rullzer added this to the 2.1-next milestone Nov 1, 2015
@@ -74,14 +74,34 @@ class OcsShareJob : public OcsJob {
void setPublicUpload(const QString &shareId, bool publicUpload);

/**
* Set the permissions
*
* @pararm permissions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/pararm/param/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@guruz
Copy link
Contributor

guruz commented Nov 2, 2015

Looks good!

I added some comments..

So command_SHARE_USER_GROUP it is specified that it will be a different menu entry in the file managers?


void ShareeModel::shareesFetched(const QVariantMap &reply)
{
qDebug() << Q_FUNC_INFO << reply;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q_FUNC_INFO is redudent

For user/group/remote shares we were just missing the setPermissions
functionality
Dialog can now retrive current shares for path, set the permissions on
those shares and delete the share.
@rullzer
Copy link
Contributor Author

rullzer commented Nov 4, 2015

So command_SHARE_USER_GROUP it is specified that it will be a different menu entry in the file managers?

Mmmm, so it is done that way now. We could maybe merge them later. For now having separte stuff make developing and debugging so much easier.

Now we have 1 simple dialog that includes 2 widgets.
* ShareLinkWidget (for link shares)
* ShareUserGroupWidget (for user/group shares)

The ShareUserGroupWidget is only included if the server version is >=
8.2.0

For <8.2.0 the old behavior is preserved
You can't share with a user/group that you've already shared with
You can't share with yourself
@rullzer
Copy link
Contributor Author

rullzer commented Nov 5, 2015

Ok it is getting more and more ready.

Now we just have 1 share dialog. That uses both widgets. sharing seems to work for me pretty well now.
Still some stuff left but I think it would be good to merge somewhere tomorrow so testing can begin.

TODO

  • Spinner when searching
  • Disable lineedit and button when searching/sharing

I'll take a look at those issues this evening/tomorrow.

Then we need some UI finetuning I think. But that is of later concern (and I'm not that good at it :P)

@rullzer rullzer changed the title [WIP] User group sharing User group sharing Nov 6, 2015
@rullzer
Copy link
Contributor Author

rullzer commented Nov 6, 2015

Ok let me merge this now. We can have a look at the remaining issues later. But then testing can begin!

rullzer added a commit that referenced this pull request Nov 6, 2015
@rullzer rullzer merged commit 914a942 into master Nov 6, 2015
@rullzer rullzer deleted the user_group_sharing branch November 6, 2015 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants