public function addPermissions($permissions)
    {
        if (is_array($permissions)) {
            foreach($permissions as $perm) {
                $this->permissions[$perm->getRoleName()] = $perm;
            }
        } else {
            $this->permissions[$permissions->getRoleName()] = $permissions;
        }
        return $this;
    }