Commit b2bffa3b authored by Paul Brown's avatar Paul Brown

Merge pull request #1028 from Kha/patch-1

Docs: Use inaccessible_callback
parents 01589c4c 420b87d6
......@@ -125,9 +125,8 @@ could be as simple as::
def is_accessible(self):
return login.current_user.is_authenticated()
def _handle_view(self, name, **kwargs):
def inaccessible_callback(self, name, **kwargs):
# redirect to login page if user doesn't have access
if not self.is_accessible():
return redirect(url_for('login', next=request.url))
In the navigation menu, components that are not accessible to a particular user will not be displayed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment