-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Allow public page access to apps with group restrictions #8593
Conversation
…loud#6962, refs nextcloud#5309 It allows non-logged user to access public pages of applications restricted to a group Signed-off-by: Julien Veyssier <[email protected]>
I'm still unsure if this is the right approach, because the app could be disabled. On the other side the app code is only loaded if the app is enabled at all. Just thinking about possible side effects. |
CI failure is unrelated and fixed in master. |
If the app is not enabled we also cna't route anywhere ;) Let me think about this a bit. And add test cases at least. (I want all our security middleware to be properly unit tested at the very least). |
Also not a big fan of this. |
I still see the point. Sometimes you have public pages (i.e. an external API endpoint that is authenticated but you want the pages that are shown internally only show to a limited group). |
To help you picture the two problems : I want to restrict Gallery app to a group. In Gallery, I generate a share link for a directory. For visitors who are not logged in, this link leads to a page saying : App is not enabled. For users who are not in the allowed group, there is a redirection to Files app. In my opinion, visitors and any user should be able to visit any public page even if it comes from an app which is restricted to a group. This problem does not exist with the File app which can't be restricted to a group. |
Ok let me fix some tests here and then lets do it. |
Signed-off-by: Roeland Jago Douma <[email protected]>
Signed-off-by: Roeland Jago Douma <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #8593 +/- ##
============================================
+ Coverage 51.87% 51.94% +0.06%
- Complexity 25406 25407 +1
============================================
Files 1609 1609
Lines 95296 95296
Branches 1378 1378
============================================
+ Hits 49437 49500 +63
+ Misses 45859 45796 -63
|
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.
fine by me now
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.
Added code looks good and it CI failure is unrelated.
Thanks a lot for having considered this PR ! |
@eneiluj sure. And feel free to submit more :) |
Well this changes the definition of the "Enable for groups", please add to the dev notes and make sure it ends up in the release notes. |
Yes - already on it |
This PR is related to #6962, #5309, nextcloud/polls#225 and phonetrack-oc/#78.
It allows non-logged user to access public pages of applications restricted to a group.
It does not fix the following problem : Logged-in users who are not in the authorized group cannot access public pages of an app. They are redirected to "Files" app.
I ran unit tests with autotest.sh and there were two unrelated errors :