[
https://issues.apache.org/jira/browse/CASSANDRA-13358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brandon Williams updated CASSANDRA-13358:
-----------------------------------------
Resolution: Not A Problem
Status: Resolved (was: Open)
> AlterViewStatement.checkAccess can throw exceptions
> ---------------------------------------------------
>
> Key: CASSANDRA-13358
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13358
> Project: Cassandra
> Issue Type: Bug
> Components: Legacy/CQL
> Reporter: Hao Zhong
> Assignee: Hao Zhong
> Priority: Normal
> Fix For: 2.1.x
>
> Attachments: cassandra.patch
>
>
> The AlterViewStatement.checkAccess method has code lines as follow:
> {code:title=AlterViewStatement.java|borderStyle=solid}
> if (baseTable != null)
> state.hasColumnFamilyAccess(keyspace(), baseTable.name,
> Permission.ALTER);
> {code}
> These lines can throw InvalidRequestException. Indeed,
> DropTableStatement.checkAccess has a similar problem, and was fixed in
> CASSANDRA-6687. The fixed code is as follow:
> {code:title=DropTableStatement.java|borderStyle=solid}
> try
> {
> state.hasColumnFamilyAccess(keyspace(), columnFamily(),
> Permission.DROP);
> }
> catch (InvalidRequestException e)
> {
> if (!ifExists)
> throw e;
> }
> {code}
> Please fix the problem as CASSANDRA-6687 did.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]