-
Notifications
You must be signed in to change notification settings - Fork 13
Adding Access project in django for access modules code #4
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
Conversation
Adding Access modules code for loading the access modules Adding for the access reject and acces grant helper code Adding unit tests for the helpers code
vedharish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For next PRs:
- remove Access/admin.py
- remove reference
request.user.user.is_ops - Add a task that enigma supports api access via tokens: authentication_classes; or else remove support from code; private should still support
Access/models.py
Outdated
|
|
||
| alerts_enabled = models.BooleanField(null=False, blank=False, default=False) | ||
|
|
||
| is_manager=models.BooleanField(null=False, blank=False, default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets remove from here as well, if we are stopping support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
|
||
| email = models.EmailField(null=True, blank=False) | ||
| phone = models.IntegerField(null=True,blank=True) | ||
| is_bot = models.BooleanField(null=False, blank=False, default=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need hooks? bot fields should be present on private not for public repos
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the field for now
Access/models.py
Outdated
| def __str__(self): | ||
| return self.name | ||
|
|
||
| class gitAcces(models.Model): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove till we pick github module
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Access/models.py
Outdated
| request_reason = models.TextField(null=False, blank=False) | ||
|
|
||
| approver_1 = models.ForeignKey('User', null=True, blank=True,related_name="approver_1", on_delete=models.PROTECT) | ||
| approver_2 = models.ForeignKey('User', null=True, blank=True, related_name="approver_2", on_delete=models.PROTECT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that we can only have 2 approvers instead of unlimited keys in fetch_approver_permissions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have kept this as it for now, we can change this, I can add a JIRA to address this
| @@ -0,0 +1,38 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check if we can replace with cached call to AWS api. Create separate task if we want to handle later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add this, I will add a jira for this
Adding Access modules code for loading the access modules
Adding for the access reject and access grant helper code
Adding unit tests for the helpers code