add lock page cond in review
This commit is contained in:
parent
3eaa2172b2
commit
3419ee4f6c
|
@ -32,6 +32,11 @@ def revert():
|
||||||
name = request.form.get('name')
|
name = request.form.get('name')
|
||||||
commit = request.form.get('commit')
|
commit = request.form.get('commit')
|
||||||
cname = to_canonical(name)
|
cname = to_canonical(name)
|
||||||
|
|
||||||
|
if cname in config.LOCKED:
|
||||||
|
flash("Page is locked")
|
||||||
|
return redirect(url_for(config.ROOT_ENDPOINT))
|
||||||
|
|
||||||
wiki.revert_page(name, commit, message="Reverting %s" % cname,
|
wiki.revert_page(name, commit, message="Reverting %s" % cname,
|
||||||
username=current_user.username)
|
username=current_user.username)
|
||||||
flash('Page reverted', 'success')
|
flash('Page reverted', 'success')
|
||||||
|
|
Loading…
Reference in a new issue