Skip to content

Commit

Permalink
A more straight forward implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwenpo committed Mar 8, 2021
1 parent ee91c61 commit 80504b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flask_authz/casbin_enforcer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ def __init__(self, app=None, adapter=None, watcher=None):
app (object): Flask App object to get Casbin Model
adapter (object): Casbin Adapter
"""
self.app = None
self.app = app
self.adapter = adapter
self.e = None
self.watcher = watcher
self._owner_loader = None
self.user_name_headers = None
if app:
self.init_app(app)
if self.app is not None:
self.init_app(self.app)

def init_app(self, app):
self.app = app
Expand Down

0 comments on commit 80504b0

Please # to comment.