Revised the init_app function of the "accounting.utils.permission" module to register the "can_view" and "can_edit" functions under the blueprint instead of the whole application.

This commit is contained in:
2023-02-07 17:05:27 +08:00
parent c3cedf714b
commit 699db20308
2 changed files with 7 additions and 6 deletions

View File

@ -55,7 +55,7 @@ def init_app(app: Flask, user_utils: AbstractUserUtils,
locale.init_app(app, bp)
from .utils import permission
permission.init_app(app, can_view_func, can_edit_func)
permission.init_app(bp, can_view_func, can_edit_func)
from . import base_account
base_account.init_app(app, bp)