Set the current user for this organization. THis is the user performing the request. This allows us to access `current_user_role` as a property later.
(self, user_id: str | UUID)
| 163 | invites = orm.relationship("OrgInviteModel", back_populates="org", cascade="all, delete-orphan") |
| 164 | |
| 165 | def set_current_user(self, user_id: str | UUID) -> None: |
| 166 | """ |
| 167 | Set the current user for this organization. THis is the user performing |
| 168 | the request. |
| 169 | |
| 170 | This allows us to access `current_user_role` as a property later. |
| 171 | """ |
| 172 | user_org = self.get_user_membership(user_id) |
| 173 | self._current_user_role = user_org.role |
| 174 | |
| 175 | @property |
| 176 | def current_user_role(self) -> OrgRoles: |
no test coverage detected