This commit is contained in:
aozhiwei 2024-08-04 10:49:59 +08:00
parent fb8113d989
commit c03cc919ef

View File

@ -9,11 +9,6 @@ import (
"strings"
)
type Permission struct {
api *q5.ConcurrentMap[string, bool]
ui *q5.ConcurrentMap[string, bool]
}
type role struct {
api *q5.ConcurrentMap[string, bool]
ui *q5.ConcurrentMap[string, bool]
@ -200,4 +195,12 @@ func (this *PermissionTable) genUserPermission(u *user) {
})
return true
})
{
for _, val := range u.specApi {
u.api.Store(val, true)
}
for _, val := range u.specUi {
u.ui.Store(val, true)
}
}
}