public function hasRole($role_name)
    {

        if ($this->hasSuperUser())
            return true;

        foreach ($this->group->roles as $role)
            if ($role->title == $role_name)
                return true;

        return false;

    }
public function hasRole($role_name)
    {

        if ($this->hasSuperUser())
            return true;

        foreach ($this->group->roles as $role)
            if ($role->title == $role_name)
                return true;

        return false;

    }
public function hasRole ( $ role_name ) { if ( $ this -> hasSuperUser ( ) ) return true ; foreach ( $ this -> group -> roles as $ role ) if ( $ role -> title == $ role_name ) return true ; return false ; }
Determine if the current user has a specific
role.

@param $role_name

@return bool
Determine if the current user has a specific role .