Skip to content

Conversation

@rullzer
Copy link
Contributor

@rullzer rullzer commented Jul 10, 2015

Replaces #2943
Should fix: #2815

By making use of the capabilities provided by the server we can provide a better UX.

  1. Do not allow a user to remove expire date/password if the admin enforces it
  2. Require a password from the user if this is enforced.

Roeland Jago Douma added 2 commits July 10, 2015 15:26
If the server admin has enforced the expiration date and the password our UI
should not give the user the option to remove those.
@dragotin
Copy link
Contributor

Two questions/suggestions:

  • I think we should have a Capabilities object that with proper methods, so that it reads:
    if( account()->capabilities()->pubLinkForcePassword() ) { ... instead of the map stuff we have now.
  • Please do not use the QInputDialog. The dialog has a password field already, which should be made visible rather.

What do you think?

@rullzer
Copy link
Contributor Author

rullzer commented Jul 14, 2015

  • I think we should have a Capabilities object that with proper methods, so that it reads:
    if( account()->capabilities()->pubLinkForcePassword() ) { ... instead of the map stuff we have now.

I agree. Now the questions is where and how to do this. Do we do this on a as needed basis... so I create a shareCapabilities class where all that is properly parsed. Or do we do it in 1 place where we parse everything?

  • Please do not use the QInputDialog. The dialog has a password field already, which should be made visible rather.

Yes, this should be changed indeed.

@rullzer
Copy link
Contributor Author

rullzer commented Jul 16, 2015

@dragotin both your comments are address in the latest two commits...
Code should be better readable now and no annoying extra inputdialog anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be a pointer. Just make it a normal object like the QVariantMap was.

@rullzer
Copy link
Contributor Author

rullzer commented Jul 28, 2015

@ogoffart thanks and fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks wrong, you are not assinging anything.

The default generated copy constructor and operator are fine. Implementing them breaks the move sementic. (see "Rule of zero")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aaah you are right...

guruz added a commit that referenced this pull request Jul 29, 2015
Use server capabilities for share dialog
@guruz guruz merged commit dccaba9 into owncloud:master Jul 29, 2015
@rullzer rullzer deleted the use_caps branch July 29, 2015 10:47
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.

When you enable the option of " Set default expiration date", you can share by link without knowing it

4 participants