Skip to content
Snippets Groups Projects
Unverified Commit afea3398 authored by Casey Kuhlman's avatar Casey Kuhlman
Browse files

finalize the right padding of permissions for other roles funcs

parent 8ebb44b3
No related branches found
No related tags found
No related merge requests found
......@@ -124,7 +124,7 @@ type AccountPermissions struct {
// Returns true if the role is found
func (aP *AccountPermissions) HasRole(role string) bool {
role = string(LeftPadBytes([]byte(role), 32))
role = string(RightPadBytes([]byte(role), 32))
for _, r := range aP.Roles {
if r == role {
return true
......@@ -147,7 +147,7 @@ func (aP *AccountPermissions) AddRole(role string) bool {
// Returns true if the role is removed, and false if it is not found
func (aP *AccountPermissions) RmRole(role string) bool {
role = string(LeftPadBytes([]byte(role), 32))
role = string(RightPadBytes([]byte(role), 32))
for i, r := range aP.Roles {
if r == role {
post := []string{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment