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

mattLLVW opened this issue Feb 26, 2019 · 1 comment


Copy link

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)

This comment has been minimized.

Copy link

commented Feb 26, 2019

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

@Ch3LL Ch3LL added this to the Approved milestone Feb 26, 2019
@Akm0d Akm0d self-assigned this Mar 22, 2019
@mattLLVW mattLLVW referenced this issue Apr 15, 2019
dwoz added a commit that referenced this issue Apr 17, 2019
fix: #51842
@s0undt3ch s0undt3ch closed this in 3baeedf May 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.