Skip to content

Commit

Permalink
refact(rbac): sort permission module by id asc
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrix-X committed Nov 10, 2022
1 parent bc670f8 commit 5912dcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions authorization/rbac/models/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ func NewPermissionModule(mapObject *object.Collection) *PermissionModule {
newPermissionModule := &PermissionModule{
PowerCompactModel: database.NewPowerCompactModel(),
Name: mapObject.GetString("name", ""),
URI: mapObject.GetString("uri", ""),
Component: mapObject.GetString("component", ""),
Icon: mapObject.GetString("icon", ""),
Description: mapObject.GetString("description", ""),
ParentID: mapObject.GetStringPointer("parentID", ""),
}
Expand Down
1 change: 1 addition & 0 deletions database/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ func GetAllList(db *gorm.DB, conditions *map[string]interface{},
// chunk datas
result := db.
//Debug().
Order("id ASC").
Find(items)
err = result.Error
if err != nil {
Expand Down

0 comments on commit 5912dcf

Please sign in to comment.