Skip to content

Allow survey URLs without project IDs #2384

@matiasgarciaisaia

Description

@matiasgarciaisaia

Survey URL's currently have the project ID as a required part of the path:

https://surveda-stg.instedd.org/projects/2/surveys/125

It'd be great to allow URLs like https://surveda-stg.instedd.org/surveys/125 to work, redirecting to the corresponding project ID. My main use case is for quickly looking at a survey when talking with Manu over voice, or when finding a survey ID in a DB query result.

What we should be cautious about is to first check the user's permission before redirecting (ie, if the survey 125 belongs to project 2 and the users does not have access there, return a 404 or 403). If they have proper access, redirect to the full URL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions