Skip to content

Commit

Permalink
Merge branch 'main' into member-role-hack
Browse files Browse the repository at this point in the history
  • Loading branch information
jace committed Nov 3, 2023
2 parents 8d55d2f + bdb4a6b commit 44460b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ repos:
- id: pyupgrade
args: ['--keep-runtime-typing', '--py310-plus']
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.1
rev: v0.1.3
hooks:
- id: ruff
args: ['--fix', '--exit-non-zero-on-fix']
Expand Down Expand Up @@ -100,7 +100,7 @@ repos:
additional_dependencies:
- tomli
- repo: https://github.com/psf/black
rev: 23.10.0
rev: 23.10.1
hooks:
- id: black
# Mypy is temporarily disabled until the SQLAlchemy 2.0 migration is complete
Expand Down
3 changes: 3 additions & 0 deletions funnel/models/sync_ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ class TicketEvent(GetTitleMixin, Model):
'read': {'name', 'title'},
'write': {'name', 'title'},
},
'project_usher': {
'read': {'name', 'title'},
},
}


Expand Down
6 changes: 3 additions & 3 deletions funnel/views/auth_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,19 +297,19 @@ def delete(self) -> ReturnView:


@AuthClientPermissions.views('main')
@route('/apps/info/<client>/perms/u/<user>')
@route('/apps/info/<client>/perms/u/<account>')
class AuthClientPermissionsView(UrlForView, ModelView):
model = AuthClientPermissions
route_model_map = {'client': 'auth_client.buid', 'account': 'account.buid'}
obj: AuthClientPermissions

def loader(self, client: str, user: str) -> AuthClientPermissions:
def loader(self, client: str, account: str) -> AuthClientPermissions:
return (
AuthClientPermissions.query.join(
AuthClient, AuthClientPermissions.auth_client
)
.join(Account, AuthClientPermissions.account)
.filter(AuthClient.buid == client, Account.buid == user)
.filter(AuthClient.buid == client, Account.buid == account)
.one_or_404()
)

Expand Down

0 comments on commit 44460b3

Please sign in to comment.