Skip to content

Commit

Permalink
Merge pull request #52 from ArtisanCloud/develop
Browse files Browse the repository at this point in the history
refact(rbac): sort permission module by id asc
  • Loading branch information
Matrix-X authored Nov 10, 2022
2 parents 3fe386c + 5912dcf commit 297431b
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 297431b

Please sign in to comment.