Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callback to validate role assignment #490

Merged
merged 3 commits into from
Jun 27, 2024

Commits on Jun 27, 2024

  1. Add callback to validate role assignment

    Some dab-based apps like AWX may wish to add
    exceptions to the user and team role assignments.
    
    This PR adds logic to the serializer
    .create method to execute a callback method
    that is optionally defined on the model.
    
    This callback signature looks like:
    
    validate_role_assignment(self, actor, role_definition)
    
    This callback should raise exceptions if necessary.
    
    Signed-off-by: Seth Foster <[email protected]>
    fosterseth authored and AlanCoding committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    b7fe278 View commit details
    Browse the repository at this point in the history
  2. lint

    Signed-off-by: Seth Foster <[email protected]>
    fosterseth authored and AlanCoding committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    1e653b7 View commit details
    Browse the repository at this point in the history
  3. more docs

    Signed-off-by: Seth Foster <[email protected]>
    fosterseth authored and AlanCoding committed Jun 27, 2024
    Configuration menu
    Copy the full SHA
    9ce8b88 View commit details
    Browse the repository at this point in the history