&&(rp.getEPersonID() == e.getID()) )
&&(rp.getEPersonID() == userid) )
    public static boolean authorize(Context c, int object_type, int object_id,            int action, EPerson e)        throws SQLException    {        // is authorization disabled for this context?        if( c.ignoreAuthorization() ) return true;        // is user part of admin group?        if( isAdmin( c,e.getID() ) ) return true;        // get policies for this object and action        TableRowIterator tri = DatabaseManager.query(c,            "resourcepolicy",            "SELECT * FROM resourcepolicy WHERE " +            "resource_type_id=" + object_type     + " AND " +            "resource_id="      + object_id       + " AND " +            "action_id="        + action            );                while( tri.hasNext() )        {            TableRow row = (TableRow)tri.next();            ResourcePolicy rp = new ResourcePolicy(c, row);                        // check policies for date validity            if( rp.isDateValid() )            {                // if public flag is set, action is authorize                //  for everyone (even anonymous use)                if( rp.isPublic() ) { return true; }                            if( (rp.getEPersonID() != -1)                    &&(rp.getEPersonID() == e.getID()) )                {                    return true; // match                }                                                if( (rp.getGroupID() != -1 )                    &&(Group.isMember(c, rp.getGroupID(), e.getID())) )                {                    // group was set, and eperson is a member                    // of that group                    return true;                }            }        }                // default authorization is denial        return false;    }