lottery permissions
parent
f5996afc5a
commit
d709334180
|
@ -138,6 +138,8 @@ PERMS = { # Minimum admin_level to perform action.
|
||||||
'VIEW_PENDING_SUBMITTED_MARSEYS': 3,
|
'VIEW_PENDING_SUBMITTED_MARSEYS': 3,
|
||||||
'VIEW_PENDING_SUBMITTED_HATS': 3,
|
'VIEW_PENDING_SUBMITTED_HATS': 3,
|
||||||
'BUY_GHOST_AWARD': 2,
|
'BUY_GHOST_AWARD': 2,
|
||||||
|
'LOTTERY_ADMIN': 3,
|
||||||
|
'LOTTERY_VIEW_PARTICIPANTS': 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
FEATURES = {
|
FEATURES = {
|
||||||
|
|
|
@ -8,7 +8,7 @@ from files.helpers.lottery import *
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
@app.post("/lottery/end")
|
@app.post("/lottery/end")
|
||||||
@admin_level_required(3)
|
@admin_level_required(PERMS['LOTTERY_ADMIN'])
|
||||||
@casino_required
|
@casino_required
|
||||||
def lottery_end(v):
|
def lottery_end(v):
|
||||||
success, message = end_lottery_session()
|
success, message = end_lottery_session()
|
||||||
|
@ -16,7 +16,7 @@ def lottery_end(v):
|
||||||
|
|
||||||
|
|
||||||
@app.post("/lottery/start")
|
@app.post("/lottery/start")
|
||||||
@admin_level_required(3)
|
@admin_level_required(PERMS['LOTTERY_ADMIN'])
|
||||||
@casino_required
|
@casino_required
|
||||||
def lottery_start(v):
|
def lottery_start(v):
|
||||||
start_new_lottery_session()
|
start_new_lottery_session()
|
||||||
|
@ -51,7 +51,7 @@ def lottery_active(v):
|
||||||
return {"message": "", "stats": {"user": v.lottery_stats, "lottery": lottery, "participants": participants}}
|
return {"message": "", "stats": {"user": v.lottery_stats, "lottery": lottery, "participants": participants}}
|
||||||
|
|
||||||
@app.get("/admin/lottery/participants")
|
@app.get("/admin/lottery/participants")
|
||||||
@admin_level_required(2)
|
@admin_level_required(PERMS['LOTTERY_VIEW_PARTICIPANTS'])
|
||||||
@casino_required
|
@casino_required
|
||||||
def lottery_admin(v):
|
def lottery_admin(v):
|
||||||
participants = get_users_participating_in_lottery()
|
participants = get_users_participating_in_lottery()
|
||||||
|
|
Loading…
Reference in New Issue