Skip to content

Conversation

@lumburovskalina
Copy link
Contributor

No description provided.

daemon.run_with_db_token(__migrate_kratos_users)


def __migrate_kratos_users():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

why do we have two functions __migrate_kratos_users ?
remove the old one if not used?

def get_inbox_mails_by_thread(
org_id: str,
user_id: str,
thread_id: Optional[str] = None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

optional as the last param

def get_all_users(
organization_id: str, user_role: Optional[str] = None, as_dict: bool = True
organization_id: str,
user_role: Optional[str] = None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

optional at the end

return {str(u.id): u.role for u in user.get_all()}


def get_admin_users(expand_mail_name: bool = False) -> List[User]:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this two functions look similar only the call is different not sure if it makes sense to be one function with a parameter?

raise HTTPException(status_code=403, detail="Not authorized")

mail = inbox_mail_manager.create_inbox_mail_by_thread(
org_id=user.organization_id,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

shouldn't the organization come from the FE? I think it's not the org of the user but the org that was selected in the modal?

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.

3 participants