Correct permissions test
This commit is contained in:
parent
11406080ab
commit
5b1b8cb614
4
fs.py
4
fs.py
@ -305,7 +305,7 @@ def editfile(id):
|
||||
f = File.query.get(id)
|
||||
if f is None:
|
||||
return flask.redirect(URL_DEFAULT)
|
||||
if f.user != user and user.is_admin<levels_users['Admin']:
|
||||
if f.user != user.login and user.is_admin<levels_users['Admin']:
|
||||
return flask.redirect(URL_DEFAULT)
|
||||
|
||||
if flask.request.method == "POST":
|
||||
@ -330,7 +330,7 @@ def delfile(id):
|
||||
f = File.query.get(id)
|
||||
if f is None:
|
||||
return flask.redirect(URL_DEFAULT)
|
||||
if f.user != user and user.is_admin<levels_users['Admin']:
|
||||
if f.user != user.login and user.is_admin<levels_users['Admin']:
|
||||
return flask.redirect(URL_DEFAULT)
|
||||
|
||||
confirm = flask.request.args.get('confirm')
|
||||
|
Loading…
Reference in New Issue
Block a user