frostyx / copr / copr

Forked from copr/copr 7 years ago
Clone

be4e9e8 frontend: allow admins to create projects for others

Authored and Committed by frostyx 3 years ago
    frontend: allow admins to create projects for others
    
    Fix #1216
    
    This is mainly userful for creating persistent projects because users
    can't create them on their own.
    
    Initially, I was about to fix the issue on more abstract level, probably
    in `misc.api_login_required`, it seems to affect only endpoints
    involving project creation (`apiv3_projects.add_project`,
    `apiv3_projects.fork_project`). Endpoints that operate over existing
    projects already support admin access. Therefore I decided to not add
    any additional magic and rather solve it directly in `add_project`
    function.