mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-05 20:17:53 +08:00
修复管理员无法删除项目的BUG
This commit is contained in:
parent
028f6b3690
commit
33ad75a088
@ -636,6 +636,7 @@ func (c *BookController) SaveSort() {
|
||||
|
||||
func (c *BookController) IsPermission() (*models.BookResult,error) {
|
||||
identify := c.GetString("identify")
|
||||
|
||||
book ,err := models.NewBookResult().FindByIdentify(identify,c.Member.MemberId)
|
||||
|
||||
if err != nil {
|
||||
|
@ -23,6 +23,7 @@ func init() {
|
||||
beego.Router("/manager/member/change-member-role", &controllers.ManagerController{},"post:ChangeMemberRole")
|
||||
beego.Router("/manager/books", &controllers.ManagerController{},"*:Books")
|
||||
beego.Router("/manager/books/edit/:key", &controllers.ManagerController{},"*:EditBook")
|
||||
beego.Router("/manager/books/delete", &controllers.ManagerController{},"*:DeleteBook")
|
||||
beego.Router("/manager/comments", &controllers.ManagerController{},"*:Comments")
|
||||
beego.Router("/manager/books/token", &controllers.ManagerController{},"post:CreateToken")
|
||||
beego.Router("/manager/setting",&controllers.ManagerController{},"*:Setting")
|
||||
|
@ -165,8 +165,8 @@
|
||||
<!-- Delete Book Modal -->
|
||||
<div class="modal fade" id="deleteBookModal" tabindex="-1" role="dialog" aria-labelledby="deleteBookModalLabel">
|
||||
<div class="modal-dialog" role="document">
|
||||
<form method="post" id="deleteBookForm" action="{{urlfor "BookController.Delete"}}">
|
||||
<input type="hidden" name="identify" value="{{.Model.Identify}}">
|
||||
<form method="post" id="deleteBookForm" action="{{urlfor "ManagerController.DeleteBook"}}">
|
||||
<input type="hidden" name="book_id" value="{{.Model.Bookid}}">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
|
Loading…
Reference in New Issue
Block a user