public abstract class org.apache.cassandra.cql3.statements.PermissionsManagementStatement extends org.apache.cassandra.cql3.statements.AuthorizationStatement
minor version: 0
major version: 59
flags: flags: (0x0421) ACC_PUBLIC, ACC_SUPER, ACC_ABSTRACT
this_class: org.apache.cassandra.cql3.statements.PermissionsManagementStatement
super_class: org.apache.cassandra.cql3.statements.AuthorizationStatement
{
protected final java.util.Set<org.apache.cassandra.auth.Permission> permissions;
descriptor: Ljava/util/Set;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
Signature: Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;
protected org.apache.cassandra.auth.IResource resource;
descriptor: Lorg/apache/cassandra/auth/IResource;
flags: (0x0004) ACC_PROTECTED
protected final org.apache.cassandra.auth.RoleResource grantee;
descriptor: Lorg/apache/cassandra/auth/RoleResource;
flags: (0x0014) ACC_PROTECTED, ACC_FINAL
protected void <init>(java.util.Set<org.apache.cassandra.auth.Permission>, org.apache.cassandra.auth.IResource, org.apache.cassandra.cql3.RoleName);
descriptor: (Ljava/util/Set;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/cql3/RoleName;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=2, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial org.apache.cassandra.cql3.statements.AuthorizationStatement.<init>:()V
1: aload 0
aload 1
putfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.permissions:Ljava/util/Set;
2: aload 0
aload 2
putfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
3: aload 0
aload 3
invokevirtual org.apache.cassandra.cql3.RoleName.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
putfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
4: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/cql3/statements/PermissionsManagementStatement;
0 5 1 permissions Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;
0 5 2 resource Lorg/apache/cassandra/auth/IResource;
0 5 3 grantee Lorg/apache/cassandra/cql3/RoleName;
Signature: (Ljava/util/Set<Lorg/apache/cassandra/auth/Permission;>;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/cql3/RoleName;)V
MethodParameters:
Name Flags
permissions
resource
grantee
public void validate(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 1
invokevirtual org.apache.cassandra.service.ClientState.ensureNotAnonymous:()V
1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getRoleManager:()Lorg/apache/cassandra/auth/IRoleManager;
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
invokeinterface org.apache.cassandra.auth.IRoleManager.isExistingRole:(Lorg/apache/cassandra/auth/RoleResource;)Z
ifne 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Role %s doesn't exist"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.grantee:Lorg/apache/cassandra/auth/RoleResource;
invokevirtual org.apache.cassandra.auth.RoleResource.getRoleName:()Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
aload 0
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
aload 1
invokestatic org.apache.cassandra.cql3.statements.PermissionsManagementStatement.maybeCorrectResource:(Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/auth/IResource;
putfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
4: aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
instanceof org.apache.cassandra.auth.FunctionResource
ifeq 7
5: ldc "system"
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
checkcast org.apache.cassandra.auth.FunctionResource
invokevirtual org.apache.cassandra.auth.FunctionResource.getKeyspace:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 7
6: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Altering permissions on builtin functions is not supported"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
invokeinterface org.apache.cassandra.auth.IResource.exists:()Z
ifne 9
8: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Resource %s doesn't exist"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/cql3/statements/PermissionsManagementStatement;
0 10 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
state
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 0
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
aload 1
invokestatic org.apache.cassandra.cql3.statements.PermissionsManagementStatement.maybeCorrectResource:(Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/auth/IResource;
putfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
1: aload 1
getstatic org.apache.cassandra.auth.Permission.AUTHORIZE:Lorg/apache/cassandra/auth/Permission;
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
invokevirtual org.apache.cassandra.service.ClientState.ensureHasPermission:(Lorg/apache/cassandra/auth/Permission;Lorg/apache/cassandra/auth/IResource;)V
2: aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.permissions:Ljava/util/Set;
invokeinterface java.util.Set.iterator:()Ljava/util/Iterator;
astore 3
goto 5
StackMap locals: org.apache.cassandra.cql3.statements.PermissionsManagementStatement org.apache.cassandra.service.ClientState top java.util.Iterator
StackMap stack:
3: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.auth.Permission
astore 2
start local 2 4: aload 1
aload 2
aload 0
getfield org.apache.cassandra.cql3.statements.PermissionsManagementStatement.resource:Lorg/apache/cassandra/auth/IResource;
invokevirtual org.apache.cassandra.service.ClientState.ensureHasPermission:(Lorg/apache/cassandra/auth/Permission;Lorg/apache/cassandra/auth/IResource;)V
end local 2 5: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 3
6: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/cql3/statements/PermissionsManagementStatement;
0 7 1 state Lorg/apache/cassandra/service/ClientState;
4 5 2 p Lorg/apache/cassandra/auth/Permission;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException
MethodParameters:
Name Flags
state
}
SourceFile: "PermissionsManagementStatement.java"