Skip to content

Allow public page access to apps with group restrictions on #5309

Description

@pranavk

Currently, when group restrictions are on, it is not possible to have a controller method declared as public page because the security middleware checks if the app is enabled for the user unconditionally.

See: https://github.com/nextcloud/server/blob/master/lib/private/AppFramework/Middleware/Security/SecurityMiddleware.php#L188

Although, when group restrictions are disabled, then \OC_App::isEnabled($this->appName) returns true making it possible to access a public controller method.

However, an app might need to make a method public even when group restrictions are on. My use case is nextcloud/richdocuments where the document editing service requires to download the document from nextcloud to be able to edit it. Since it has no user context, it downloads the file (and does some other stuff too) via a public controller method, which fails when group restrictions are on.

I think we may need to introduce a new annotation here and then guard the security middleware method there with it.

Activity

  1. julien-nc commented on Jan 31, 2018

    @julien-nc
    Member

    Did you find a solution ? I'm looking for a way to allow public pages to my apps (PhoneTrack and GpxPod) when there are group restrictions...

  2. julien-nc commented on Feb 28, 2018

    @julien-nc
    Member

    There is a duplicate of this issue : #6962

  3. julien-nc commented on Mar 7, 2018

    @julien-nc
    Member

    #8593 partially fixes the problem : Routing system is still redirecting users who are not in any authorized group when they try to access to public pages of restricted apps. I'll try to find where to fix that.

  4. ghost removed
    staleTicket or PR with no recent activity
    on Jun 12, 2019
  5. szaimen commented on May 21, 2021

    @szaimen
    Contributor

    I suppose this issue is still valid? If not, please close this issue!

  6. added
    needs reviewNeeds review to determine if still applicable or covered by other Issues
    on Oct 17, 2024
  7. Rello commented on Jan 13, 2025

    @Rello
    Contributor

    this issue is still valid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions