create_view_statement: Implement check_access

This patch implements check_access according to Cassandra's
implementation.

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2016-10-20 19:16:59 +01:00
parent a9c17b0a52
commit 5bd74abee8
2 changed files with 1 additions and 3 deletions

View File

@@ -78,10 +78,8 @@ create_view_statement::create_view_statement(
fail(unimplemented::cause::VIEWS);
}
// FIXME: I copied the following from create_table_statement. I don't know
// what they do or whether they need to change for create view.
future<> create_view_statement::check_access(const service::client_state& state) {
return state.has_keyspace_access(keyspace(), auth::permission::CREATE);
return state.has_column_family_access(keyspace(), _base_name->get_column_family(), auth::permission::ALTER);
}
void create_view_statement::validate(distributed<service::storage_proxy>&, const service::client_state& state) {

View File