mirror of
https://shylinux.com/x/enterprise
synced 2025-04-25 17:18:06 +08:00
add some
This commit is contained in:
parent
cde3aeb19c
commit
18fbc7fbce
@ -46,16 +46,10 @@ func (s Table) SelectJoinCompany(m *ice.Message) *ice.Message {
|
||||
return s.SelectJoin(m, company{}, model.NAME, model.CITY_UID)
|
||||
}
|
||||
func (s Table) CheckRole(m *ice.Message, arg ...string) *ice.Message {
|
||||
role := UserGroupRole(kit.Int(m.Cmd(userGroup{}, s.Select, m.OptionSimple(model.GROUP_UID, model.USER_UID)).Append(model.ROLE)))
|
||||
role := UserGroupRole(s.UserPlaceRole(m))
|
||||
m.WarnNotRight(!kit.IsIn(role.String(), append(arg, UserGroupCreator.String())...), role.String())
|
||||
return m
|
||||
}
|
||||
func (s Table) recordEvent(m *ice.Message, info string, arg ...string) {
|
||||
s.Table.RecordEvent(m, m.Option(model.GROUP_UID), info, kit.Select(m.Option(model.UID), arg, 0))
|
||||
}
|
||||
func (s Table) recordEventWithName(m *ice.Message, info string) {
|
||||
s.Table.RecordEventWithName(m, m.Option(model.GROUP_UID), info)
|
||||
}
|
||||
|
||||
type Tables struct{ Table }
|
||||
|
||||
|
@ -16,7 +16,7 @@ type target struct {
|
||||
|
||||
func (s target) Create(m *ice.Message, arg ...string) {
|
||||
s.Table.Create(m, kit.Simple(arg, m.OptionSimple(model.GROUP_UID, model.USER_UID))...)
|
||||
s.recordEventWithName(m, "")
|
||||
s.RecordEventWithName(m, "")
|
||||
}
|
||||
func (s target) List(m *ice.Message, arg ...string) {
|
||||
s.TablesWithRole(m, arg, s.userGroup, s.group, s, model.TITLE, model.CONTENT).Display("")
|
||||
|
Loading…
x
Reference in New Issue
Block a user