code: func HasPermission(st Interface, address crypto.Address, perm permission.PermFlag) bool {
  	globalPerms := st.GetPermissions(acm.GlobalPermissionsAddress)
  	accPerms := st.GetPermissions(address)
  	perms := accPerms.Base.Compose(globalPerms.Base)
  	value, err := perms.Get(perm)
  	if err != nil {
  		return false
  	}
  	return value
  }
docs: // CONTRACT: it is the duty of the contract writer to call known permissions
  // we do not convey if a permission is not set
  // (unlike in state/execution, where we guarantee HasPermission is called
  // on known permissions and panics else)
  // If the perm is not defined in the acc nor set by default in GlobalPermissions,
  // this function returns false.