Regular user role (id=4) with read-only permissions.
(db, org)
| 234 | |
| 235 | @pytest.fixture |
| 236 | async def user_role(db, org): |
| 237 | """Regular user role (id=4) with read-only permissions.""" |
| 238 | r = Role( |
| 239 | id=4, |
| 240 | name="User", |
| 241 | org_id=org.id, |
| 242 | role_type=RoleTypeEnum.TYPE_ORGANIZATION, |
| 243 | role_uuid="role_user", |
| 244 | rights=USER_RIGHTS.model_dump(), |
| 245 | creation_date=str(datetime.now()), |
| 246 | update_date=str(datetime.now()), |
| 247 | ) |
| 248 | db.add(r) |
| 249 | await db.commit() |
| 250 | await db.refresh(r) |
| 251 | return r |
| 252 | |
| 253 | |
| 254 | # --------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected