Skip to content

Conversation

@tscuite
Copy link
Member

@tscuite tscuite commented Feb 3, 2023

feat: Update some APIs to department permissions

@tscuite tscuite changed the title feat: Update some APIs to department permissions feat: Vulnerability acquisition page summary added language Feb 6, 2023
flat=True))
must_query = [
Q('terms', user_id=user_id_list),
Q('terms', user_id=department),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

department_id=department

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

department IastDepartment
expect int here

return Department.objects.filter(principal_id=self.id).exists()

def get_relative_department(self):
def get_relative_department(self) -> IastDepartment:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Department


def get_annotate_data(
user_id: int, bind_project_id=int, project_version_id=int
department: int, bind_project_id=int, project_version_id=int
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

: int?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

project__department__in=department Department



def get_agent_stat(agent_id: int, user_id: int) -> dict:
def get_agent_stat(agent_id: int, department: int) -> dict:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Department

agent__id=agent_id,
from_where=FromWhereChoices.FROM_AGENT,
agent__user__in=get_auth_users__by_id(user_id)).count()
agent__department__in=department).count()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent__department__in
project

if not project:
project = IastProject.objects.create(name=name,
user=request.user)
department_id = request.data.get("department_id")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too Nested

agent=agent,
context_path='',
counts=1,
language='NGUAGE',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@Bidaya0 Bidaya0 merged commit a76a002 into HXSecurity:main Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants