Skip to content

Conversation

@Kartikkumar-Shetty
Copy link
Contributor

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

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
Copy link
Collaborator

@vedharish vedharish left a 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)
Copy link
Collaborator

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

Copy link
Contributor Author

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)
Copy link
Collaborator

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

Copy link
Contributor Author

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):
Copy link
Collaborator

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

Copy link
Contributor Author

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)
Copy link
Collaborator

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

Copy link
Contributor Author

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 @@
{
Copy link
Collaborator

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

Copy link
Contributor Author

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

@vedharish vedharish merged commit 3a55f92 into main Dec 26, 2022
@vedharish vedharish deleted the CTO-158_1 branch December 26, 2022 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants