[docs]classEdgeAclProvider:""" This object provides ACLs for tables based on the requesting user at request time. """
[docs]@staticmethoddefbuilder():""" Create a builder to construct an EdgeAclProvider :return: a new builder """returnEdgeAclProviderBuilder(_j_provider_type.builder())
@staticmethoddefadd_object_acl(group:str,value):_j_provider_type.addAcl(group,unwrap(value))def__init__(self,j_provider:jpy.JType):self.j_provider=jpy.cast(j_provider,_j_provider_type)ifself.j_providerisNone:raiseDHError("j_provider type is not io.deephaven.enterprise.database.Database")
[docs]defapply_to(self,table:Table):""" Attach this ACL Provider to a table :param table: the table to attach to :return: the table with the ACLs attached """returnTable(self.j_provider.applyTo(table.j_table))
[docs]defrow_acl(self,group:str,acl:_j_generator_type):""" Add a Row ACL for the specified group to the table. :param group: the group the ACL applies to :param acl: the generator that will produce a filter for a given user :return: this builder """self.j_builder.rowAcl(group,acl)returnself
[docs]defcolumn_acl(self,group:str,columns:list,acl:_j_generator_type):""" Add a Column ACL for the specified group and column to the table. :param group: the group the ACL applies to :param columns: the column the acl applies to :param acl: the generator that will produce a filter for a given user :return: this builder """self.j_builder.columnAcl(group,j_array_list(columns),acl)returnself
[docs]defbuild(self):""" Construct the completed EdgeAclProvider object from this builder state :return: a new EdgeAclProvider """returnEdgeAclProvider(self.j_builder.build())