make play key perms make sense
adjust GM level 1 name and some related displays
This commit is contained in:
parent
4aff169967
commit
19f38b379e
@ -31,7 +31,7 @@ def index():
|
|||||||
@login_required
|
@login_required
|
||||||
def about():
|
def about():
|
||||||
"""About Page"""
|
"""About Page"""
|
||||||
mods = Account.query.filter(Account.gm_level > 0).order_by(Account.gm_level.desc()).all()
|
mods = Account.query.filter(Account.gm_level > 1).order_by(Account.gm_level.desc()).all()
|
||||||
online = 0
|
online = 0
|
||||||
users = []
|
users = []
|
||||||
zones = {}
|
zones = {}
|
||||||
|
@ -11,14 +11,14 @@ play_keys_blueprint = Blueprint('play_keys', __name__)
|
|||||||
# Key creation page
|
# Key creation page
|
||||||
@play_keys_blueprint.route('/', methods=['GET'])
|
@play_keys_blueprint.route('/', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def index():
|
def index():
|
||||||
return render_template('play_keys/index.html.j2')
|
return render_template('play_keys/index.html.j2')
|
||||||
|
|
||||||
|
|
||||||
@play_keys_blueprint.route('/create/<count>/<uses>', methods=['GET'], defaults={'count': 1, 'uses': 1})
|
@play_keys_blueprint.route('/create/<count>/<uses>', methods=['GET'], defaults={'count': 1, 'uses': 1})
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def create(count=1, uses=1):
|
def create(count=1, uses=1):
|
||||||
key = PlayKey.create(count=count, uses=uses)
|
key = PlayKey.create(count=count, uses=uses)
|
||||||
log_audit(f"Created {count} Play Key(s) with {uses} uses!")
|
log_audit(f"Created {count} Play Key(s) with {uses} uses!")
|
||||||
@ -28,7 +28,7 @@ def create(count=1, uses=1):
|
|||||||
|
|
||||||
@play_keys_blueprint.route('/create/bulk', methods=('GET', 'POST'))
|
@play_keys_blueprint.route('/create/bulk', methods=('GET', 'POST'))
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def bulk_create():
|
def bulk_create():
|
||||||
form = CreatePlayKeyForm()
|
form = CreatePlayKeyForm()
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
@ -42,7 +42,7 @@ def bulk_create():
|
|||||||
|
|
||||||
@play_keys_blueprint.route('/delete/<id>', methods=('GET', 'POST'))
|
@play_keys_blueprint.route('/delete/<id>', methods=('GET', 'POST'))
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def delete(id):
|
def delete(id):
|
||||||
key = PlayKey.query.filter(PlayKey.id == id).first()
|
key = PlayKey.query.filter(PlayKey.id == id).first()
|
||||||
# associated_accounts = Account.query.filter(Account.play_key_id==id).all()
|
# associated_accounts = Account.query.filter(Account.play_key_id==id).all()
|
||||||
@ -54,7 +54,7 @@ def delete(id):
|
|||||||
|
|
||||||
@play_keys_blueprint.route('/edit/<id>', methods=('GET', 'POST'))
|
@play_keys_blueprint.route('/edit/<id>', methods=('GET', 'POST'))
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def edit(id):
|
def edit(id):
|
||||||
key = PlayKey.query.filter(PlayKey.id == id).first()
|
key = PlayKey.query.filter(PlayKey.id == id).first()
|
||||||
form = EditPlayKeyForm()
|
form = EditPlayKeyForm()
|
||||||
@ -81,7 +81,7 @@ def edit(id):
|
|||||||
|
|
||||||
@play_keys_blueprint.route('/view/<id>', methods=('GET', 'POST'))
|
@play_keys_blueprint.route('/view/<id>', methods=('GET', 'POST'))
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def view(id):
|
def view(id):
|
||||||
key = PlayKey.query.filter(PlayKey.id == id).first()
|
key = PlayKey.query.filter(PlayKey.id == id).first()
|
||||||
accounts = Account.query.filter(Account.play_key_id == id).all()
|
accounts = Account.query.filter(Account.play_key_id == id).all()
|
||||||
@ -90,7 +90,7 @@ def view(id):
|
|||||||
|
|
||||||
@play_keys_blueprint.route('/get', methods=['GET'])
|
@play_keys_blueprint.route('/get', methods=['GET'])
|
||||||
@login_required
|
@login_required
|
||||||
@gm_level(9)
|
@gm_level(5)
|
||||||
def get():
|
def get():
|
||||||
columns = [
|
columns = [
|
||||||
ColumnDT(PlayKey.id),
|
ColumnDT(PlayKey.id),
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
<a id='property-index' class='nav-link' href='{{ url_for('properties.index') }}'>Properties</a>
|
<a id='property-index' class='nav-link' href='{{ url_for('properties.index') }}'>Properties</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if current_user.is_authenticated and current_user.gm_level == 9 and config.REQUIRE_PLAY_KEY %}
|
{% if current_user.is_authenticated and current_user.gm_level >= 5 and config.REQUIRE_PLAY_KEY %}
|
||||||
{# Play Keys #}
|
{# Play Keys #}
|
||||||
<a id='play_keys-index' class='nav-link' href='{{ url_for('play_keys.index') }}'>Play Keys</a>
|
<a id='play_keys-index' class='nav-link' href='{{ url_for('play_keys.index') }}'>Play Keys</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
{% if gm_level==0 %}
|
{% if gm_level==0 %}
|
||||||
Player
|
Player
|
||||||
{% elif gm_level==1 %}
|
{% elif gm_level==1 %}
|
||||||
Key Distributor
|
Elevevated Civilan {# Unused #}
|
||||||
{% elif gm_level==2 %}
|
{% elif gm_level==2 %}
|
||||||
Junior Moderator
|
Junior Moderator
|
||||||
{% elif gm_level==3 %}
|
{% elif gm_level==3 %}
|
||||||
|
Loading…
Reference in New Issue
Block a user