Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gestioCOF
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 76
    • Issues 76
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Klub Dev ENSKlub Dev ENS
  • gestioCOF
  • Merge requests
  • !257

Cleaner use of Group in kfet app

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Aurélien Delobelle requested to merge aureplop/kfet-auth_perms into aureplop/kfet-auth Sep 27, 2017
  • Overview 7
  • Commits 3
  • Pipelines 0
  • Changes 16

KFetGroup model

  • Provides a distinction from non-kfet Groups.
  • Convert code appropriately.
  • Initially filled from Groups containing K-Fêt (this was the previous distinction) in the kfetauth.0002 migration.

Permission proxy model (kfetauth app)

  • Proxy of the django.contrib.auth Permission model.
  • Adds the 'kfet' manager which returns only kfet-related permissions.

KeepUnselectableModelFormMixin

  • Helps to keep the unselectable items of many-to-many field for ModelForm.
  • 'kfetauth' forms (related to KFetGroup) use this mixin.

Using KFetGroup allows to simplify the 'kfet/account_group_form.html' template.

A bug is also fixed in 'kfet/form_field_snippet.html', which could lead to prevent field displays if they used CheckboxSelectMultiple widget.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: aureplop/kfet-auth_perms