cozy / cozy-clearance

Clearance manager for cozy apps
Other
2 stars 7 forks source link

fix problem when double clicking on "private" #21

Closed cylwin closed 9 years ago

cylwin commented 9 years ago

Hello,

If we refresh the view when the clearance have not changed, there is a freeze and we can't change the clareance again. This commit fix this issue. Maybe it's not the good way to fix the problem, but it works.

Bye

frankrousseau commented 9 years ago

In fact you should ensure that clearance is not private instead of testing if it's public. Because there is a third case: sharing with a list of users.

cylwin commented 9 years ago

not private == empty array ?

frankrousseau commented 9 years ago

You should use the dedicated function isPrivateClearance:

https://github.com/cylwin/cozy-clearance/blob/patch-1/client/modal_share_view.coffee#L239-L241

frankrousseau commented 9 years ago

It's still wrong you should ensure that clearance is not private instead of testing if it's public. Because there is a third case: sharing with a list of users.

frankrousseau commented 9 years ago

Thank you @cylwin!