pub fn has_list_access(list_id: i32, user_id: i32, conn: &PgConnection) -> bool {
        let row: QueryResult<UserList> = dsl::user_lists
            .filter(dsl::user_id.eq(&user_id))
            .filter(dsl::list_id.eq(&list_id))
            .get_result::<UserList>(conn);

        match row {
            Ok(_) => true,
            Err(_) => false,
        }
    }
/// Determines whether or not the user with ID `user_id` has access to edit the list with ID `list_id`.
/// Note: a user doesn't have to own a list in order to edit it
Determines whether or not the user with ID `user_id` has access to edit the list with ID `list_id`.
Note: a user doesn't have to own a list in order to edit it
Determines whether or not the user with ID ` user_id ` has access to edit the list with ID ` list_id ` . Note : a user doesn ' t have to own a list in order to edit it
pub fn has_list_access(list_id: i32, user_id: i32, conn: &PgConnection) -> bool {
        let row: QueryResult<UserList> = dsl::user_lists
            .filter(dsl::user_id.eq(&user_id))
            .filter(dsl::list_id.eq(&list_id))
            .get_result::<UserList>(conn);
        match row {
            Ok(_) => true,
            Err(_) => false,
        }
    }
pub fn has_list_access ( list_id : i32 , user_id : i32 , conn : & PgConnection ) -> bool { let row : QueryResult < UserList > = dsl :: user_lists . filter ( dsl :: user_id . eq ( & user_id ) ) . filter ( dsl :: list_id . eq ( & list_id ) ) . get_result :: < UserList > ( conn ) ; match row { Ok ( _ ) => true , Err ( _ ) => false , } }
Determines whether or not the user with ID `user_id` has access to edit the list with ID `list_id`.
Determines whether or not the user with ID ` user_id ` has access to edit the list with ID ` list_id ` .
list_id
i32
user_id
i32
conn
&PgConnection
list_id
i32
user_id
i32
conn
&PgConnection