Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Fix comments in permissions util
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Davis committed Apr 13, 2017
1 parent 193910c commit 6656748
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions permission/types/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

package types

// ConvertMapStringIntToPermissions converts a map of string-integer pairs and a slice of
// strings for the roles to an AccountPermissions type. The integer needs to be greater
// than zero to set the permission. For all unmentioned permissions the ZeroBasePermissions
// is defaulted to.
// TODO: [ben] re-evaluate the use of int for setting the permission.
// ConvertMapStringIntToPermissions converts a map of string-bool pairs and a slice of
// strings for the roles to an AccountPermissions type. If the value in the
// permissions map is true for a particular permission string then the permission
// will be set in the AccountsPermissions. For all unmentioned permissions the
// ZeroBasePermissions is defaulted to.
func ConvertPermissionsMapAndRolesToAccountPermissions(permissions map[string]bool, roles []string) (*AccountPermissions, error) {
var err error
accountPermissions := &AccountPermissions{}
Expand All @@ -30,8 +30,8 @@ func ConvertPermissionsMapAndRolesToAccountPermissions(permissions map[string]bo
return accountPermissions, nil
}

// convertPermissionsMapStringIntToBasePermissions converts a map of string-integer pairs to
// BasePermissions.
// convertPermissionsMapStringIntToBasePermissions converts a map of string-bool
// pairs to BasePermissions.
func convertPermissionsMapStringIntToBasePermissions(permissions map[string]bool) (BasePermissions, error) {
// initialise basePermissions as ZeroBasePermissions
basePermissions := ZeroBasePermissions
Expand Down

0 comments on commit 6656748

Please sign in to comment.