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

salt.auth.django docs use wrong model name #51842

Closed
mattLLVW opened this issue Feb 26, 2019 · 1 comment
Closed

salt.auth.django docs use wrong model name #51842

mattLLVW opened this issue Feb 26, 2019 · 1 comment
Assignees
Labels
Bug broken, incorrect, or confusing behavior Documentation Relates to Salt documentation P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@mattLLVW
Copy link
Contributor

mattLLVW commented Feb 26, 2019

salt.auth.django doc uses:

class SaltExternalAuthModel(models.Model):
    user_fk = models.ForeignKey(auth.User)
    minion_matcher = models.CharField()
    minion_fn = models.CharField()

as an exemple of a django model to auth users.

There's few problems:

  • the actual module tries to to fetch minion_or_fn_matcher user attribute.

  • CharField should have mandatory max_length kwarg.

  • user foreign key should be:

    from django.contrib.auth.models import User
    ...
    user_fk = models.ForeignKey(User, on_delete=models.CASCADE)

Docs should be updated to:

from django.contrib.auth.models import User
class SaltExternalAuthModel(models.Model):
    user_fk = models.ForeignKey(User, on_delete=models.CASCADE)
    minion_or_fn_matcher = models.CharField(max_length=255)
    minion_fn = models.CharField(max_length=255)
@Ch3LL
Copy link
Contributor

Ch3LL commented Feb 26, 2019

would you mind submitting a PR for that change? And thanks for opening the issue :)

@Ch3LL Ch3LL added Documentation Relates to Salt documentation Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P3 Priority 3 labels Feb 26, 2019
@Ch3LL Ch3LL added this to the Approved milestone Feb 26, 2019
@Akm0d Akm0d self-assigned this Mar 22, 2019
@mattLLVW mattLLVW mentioned this issue Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Documentation Relates to Salt documentation P3 Priority 3 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

3 participants