public function setRoleWriteAccess($role, $allowed)
    {
        $this->validateRoleState($role);
        $this->setRoleWriteAccessWithName($role->getName(), $allowed);
    }
public function setRoleWriteAccess($role, $allowed)
    {
        $this->validateRoleState($role);
        $this->setRoleWriteAccessWithName($role->getName(), $allowed);
    }
public function setRoleWriteAccess ( $ role , $ allowed ) { $ this -> validateRoleState ( $ role ) ; $ this -> setRoleWriteAccessWithName ( $ role -> getName ( ) , $ allowed ) ; }
Set whether users belonging to the given role are allowed to write this
object. The role must already be saved on the server and its data must
have been fetched in order to use this method.

@param AVRole $role The role to assign access.
@param bool $allowed Whether the given role can read this object.
Set whether users belonging to the given role are allowed to write this object . The role must already be saved on the server and its data must have been fetched in order to use this method .