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

CanCreatePublicContent not checked #206

Closed
luke- opened this issue Feb 1, 2024 · 7 comments
Closed

CanCreatePublicContent not checked #206

luke- opened this issue Feb 1, 2024 · 7 comments
Assignees
Labels

Comments

@luke-
Copy link
Contributor

luke- commented Feb 1, 2024

Reproduce:

  • Allow Space members to create files
  • Disallow to create Public Content

==> It's still possible to change visibility to public in the File module dialogs

@yurabakhtin
Copy link
Contributor

@luke- Fixed in core PR humhub/humhub#6836

@luke-
Copy link
Contributor Author

luke- commented Feb 5, 2024

@yurabakhtin Does this checkbox really executes the core toggle action?
image

@yurabakhtin
Copy link
Contributor

@luke- This checkbox is visible only when content can be stored as public:

public

for space with only private content it is hidden:

private

In the PR humhub/humhub#6836 I have fixed a case when space visibility is updated to Private, but some page with files list was not reloaded yet, so the menu item "Change to Public" is still visible and it was possible update such file to Public, now it is fixed with this way:

fixed-case

Was the bug fixed or I miss something?

@luke-
Copy link
Contributor Author

luke- commented Feb 6, 2024

@yurabakhtin Hmm, I think you missed something.

Set "CreatePublicContent" to "Deny" for regular Space Members

image

Login as "Regular Member".

Upload a "File".

The context menu is correct, the Change to "Public" option is not available:

image

When click on "Edit". The option is available:

image

@yurabakhtin
Copy link
Contributor

@luke- Thanks for the additional info. Fixed in PR humhub/humhub#6837.

@luke-
Copy link
Contributor Author

luke- commented Feb 7, 2024

@yurabakhtin Can you please check the failing tests? Maybe also some tests would be great here.

@yurabakhtin
Copy link
Contributor

@luke- The tests have been fixed. I don't think we need additional tests because at least this test testCreatePublicContentOnPrivateSpace does it.

@luke- luke- closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants