Remove useless stuff from privileges
This commit is contained in:
parent
f0e444cdea
commit
98137678eb
|
@ -5,18 +5,18 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type privilegesData struct {
|
type privilegesData struct {
|
||||||
PrivilegeRead bool `json:"read"`
|
Read bool `json:"read"`
|
||||||
PrivilegeReadConfidential bool `json:"read_confidential"`
|
ReadConfidential bool `json:"read_confidential"`
|
||||||
PrivilegeWrite bool `json:"write"`
|
Write bool `json:"write"`
|
||||||
PrivilegeManageBadges bool `json:"manage_badges"`
|
ManageBadges bool `json:"manage_badges"`
|
||||||
PrivilegeBetaKeys bool `json:"beta_keys"`
|
BetaKeys bool `json:"beta_keys"`
|
||||||
PrivilegeManageSettings bool `json:"manage_settings"`
|
ManageSettings bool `json:"manage_settings"`
|
||||||
PrivilegeViewUserAdvanced bool `json:"view_user_advanced"`
|
ViewUserAdvanced bool `json:"view_user_advanced"`
|
||||||
PrivilegeManageUser bool `json:"manage_user"`
|
ManageUser bool `json:"manage_user"`
|
||||||
PrivilegeManageRoles bool `json:"manage_roles"`
|
ManageRoles bool `json:"manage_roles"`
|
||||||
PrivilegeManageAPIKeys bool `json:"manage_api_keys"`
|
ManageAPIKeys bool `json:"manage_api_keys"`
|
||||||
PrivilegeBlog bool `json:"blog"`
|
Blog bool `json:"blog"`
|
||||||
PrivilegeAPIMeta bool `json:"api_meta"`
|
APIMeta bool `json:"api_meta"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// PrivilegesGET returns an explaination for the privileges, telling the client what they can do with this token.
|
// PrivilegesGET returns an explaination for the privileges, telling the client what they can do with this token.
|
||||||
|
@ -24,18 +24,18 @@ func PrivilegesGET(md common.MethodData) (r common.Response) {
|
||||||
// This code sucks.
|
// This code sucks.
|
||||||
r.Code = 200
|
r.Code = 200
|
||||||
r.Data = privilegesData{
|
r.Data = privilegesData{
|
||||||
PrivilegeRead: md.User.Privileges.HasPrivilegeRead(),
|
Read: md.User.Privileges.HasPrivilegeRead(),
|
||||||
PrivilegeReadConfidential: md.User.Privileges.HasPrivilegeReadConfidential(),
|
ReadConfidential: md.User.Privileges.HasPrivilegeReadConfidential(),
|
||||||
PrivilegeWrite: md.User.Privileges.HasPrivilegeWrite(),
|
Write: md.User.Privileges.HasPrivilegeWrite(),
|
||||||
PrivilegeManageBadges: md.User.Privileges.HasPrivilegeManageBadges(),
|
ManageBadges: md.User.Privileges.HasPrivilegeManageBadges(),
|
||||||
PrivilegeBetaKeys: md.User.Privileges.HasPrivilegeBetaKeys(),
|
BetaKeys: md.User.Privileges.HasPrivilegeBetaKeys(),
|
||||||
PrivilegeManageSettings: md.User.Privileges.HasPrivilegeManageSettings(),
|
ManageSettings: md.User.Privileges.HasPrivilegeManageSettings(),
|
||||||
PrivilegeViewUserAdvanced: md.User.Privileges.HasPrivilegeViewUserAdvanced(),
|
ViewUserAdvanced: md.User.Privileges.HasPrivilegeViewUserAdvanced(),
|
||||||
PrivilegeManageUser: md.User.Privileges.HasPrivilegeManageUser(),
|
ManageUser: md.User.Privileges.HasPrivilegeManageUser(),
|
||||||
PrivilegeManageRoles: md.User.Privileges.HasPrivilegeManageRoles(),
|
ManageRoles: md.User.Privileges.HasPrivilegeManageRoles(),
|
||||||
PrivilegeManageAPIKeys: md.User.Privileges.HasPrivilegeManageAPIKeys(),
|
ManageAPIKeys: md.User.Privileges.HasPrivilegeManageAPIKeys(),
|
||||||
PrivilegeBlog: md.User.Privileges.HasPrivilegeBlog(),
|
Blog: md.User.Privileges.HasPrivilegeBlog(),
|
||||||
PrivilegeAPIMeta: md.User.Privileges.HasPrivilegeAPIMeta(),
|
APIMeta: md.User.Privileges.HasPrivilegeAPIMeta(),
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user