Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • allgo allgo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • allgo
  • allgoallgo
  • Merge requests
  • !115

Merged
Created Sep 11, 2018 by BERJON Matthieu@mberjonContributor

Resolve "Authorized members to create an app"

  • Overview 6
  • Commits 12
  • Pipelines 5
  • Changes 8

I changed the authorization management by creating:

  • a mixin that check the authorization a the view level. The mixin overrides the dispatch method and returns a 403 HTTP error if the user doesn't have the access.
  • a function in the model.py file that makes the same checking types. The difference resides in the fact that the function is added to the User model that is used in our present case in the templates.

I didn't find a way to reuse the code because I needed to check the user authorization at the level of both the view and template level that are separated.


Users belonging to Inria or related public partners should be added to the inria group. It's done based on their email address domain. Then at registration, after the user is created, if the user's domain matches a registered domain, he is automatically added to the inria group and therefore is authorized to create new applications on A||Go.

Closes #243 (closed)

Edited Sep 19, 2018 by BERJON Matthieu
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: 243-authorized-members-to-create-an-app