Skip to content

Commit

Permalink
now tsakorpus requires administrator for force mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Nov 30, 2024
1 parent 45dc8cc commit 2e5a4d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lingvodoc/schema/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -8650,14 +8650,15 @@ def mutate(root, info, **args):
client_id = info.context.get('client_id')
client = DBSession.query(Client).filter_by(id=client_id).first()

if not client or client.user_id != 1:
force = args.get('force', False)

if force and (not client or client.user_id != 1):
return (

ResponseError(
message='Not an administrator.'))

perspective_id = args.get('perspective_id')
force = args.get('force', False)
debug_flag = args.get('debug_flag', False)

# Processing a single perspective.
Expand Down

0 comments on commit 2e5a4d9

Please sign in to comment.