'wip(logging):调整日志记录方式'
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
from flask import render_template, request
|
||||
|
||||
from applications.common.utils.rights import authorize
|
||||
from applications.common.utils.rights import permission_required, view_logging_required
|
||||
from applications.models import CompanyDepartment
|
||||
from applications.view import index_bp
|
||||
|
||||
|
||||
@index_bp.get('/dept')
|
||||
@authorize("admin:dept:main", log=True)
|
||||
@view_logging_required
|
||||
@permission_required("admin:dept:main")
|
||||
def dept_index():
|
||||
return render_template('admin/department/dept.html')
|
||||
|
||||
|
||||
@index_bp.get('/dept/add')
|
||||
@authorize("admin:dept:add", log=True)
|
||||
@view_logging_required
|
||||
@permission_required("admin:dept:add")
|
||||
def add():
|
||||
return render_template('admin/department/dept_add.html')
|
||||
|
||||
|
||||
@index_bp.get('/dept/edit')
|
||||
@authorize("admin:dept:edit", log=True)
|
||||
@view_logging_required
|
||||
@permission_required("admin:dept:edit")
|
||||
def edit():
|
||||
dept_id = request.args.get("deptId", type=int)
|
||||
dept = CompanyDepartment.query.get(dept_id)
|
||||
|
||||
Reference in New Issue
Block a user