src/Searsaw/Drawbridge/models/BridgeUser.php
public function hasPermission($permission)
    {
        $perm_id = $this->getPermissionId($permission);
        $roles = $this->getRolesWithPermission($perm_id);

        foreach ($roles as $role)
            if ($this->hasRole($role))
                return true;

        return false;
    }
public function hasPermission($permission)
    {
        $perm_id = $this->getPermissionId($permission);
        $roles = $this->getRolesWithPermission($perm_id);

        foreach ($roles as $role)
            if ($this->hasRole($role))
                return true;

        return false;
    }
public function hasPermission ( $ permission ) { $ perm_id = $ this -> getPermissionId ( $ permission ) ; $ roles = $ this -> getRolesWithPermission ( $ perm_id ) ; foreach ( $ roles as $ role ) if ( $ this -> hasRole ( $ role ) ) return true ; return false ; }
Check to see if the user has the given permission.  Permission
can be an ID, name, or Permission object

@param $permission integer|string|\Searsaw\Drawbridge\Models\BridgePermission The permission to check for

@return bool
Check to see if the user has the given permission . Permission can be an ID name or Permission object