Class TablePermission
- Inheritance
-
TablePermission
- Implements
-
- Inherited Members
-
- Namespace
- TabularEditor.TOMWrapper
- Assembly
- TOMWrapper.dll
Defines the security rules of the Role on the Table. It is a child of a Role object.
public sealed class TablePermission : TabularNamedObject, ICustomTypeDescriptor, INotifyPropertyChanging, IComparable, ITomErrorMessageObject, IAnnotationObject, IExtendedPropertyObject, IClonableObject, IDaxDependantObject, IExpressionObject, ITabularNamedObject, ITabularObject, INotifyPropertyChanged, INamedObject
- Extension Methods
-
Properties
Annotations
The collection of Annotations on the current Table Permission.
[Browsable(true)]
public AnnotationCollection Annotations { get; }
Property Value
ColumnPermissions
[Browsable(true)]
public RoleColumnOLSIndexer ColumnPermissions { get; }
Property Value
DependsOn
Gets the list of objects that this table permission depends on.
[Browsable(false)]
public DependsOnList DependsOn { get; }
Property Value
ErrorMessage
A string that explains the error state associated with the current object. It is set by the engine only when the state of the object is one of these three values: SemanticError, DependencyError, or EvaluationError. It is applicable only to columns of the type Calculated or CalculatedTableColumn. It will be empty for other column objects.
public string ErrorMessage { get; }
Property Value
ExtendedProperties
The collection of Extended Properties on the current Table Permission.
public ExtendedPropertyCollection ExtendedProperties { get; }
Property Value
FilterExpression
The DAX expression that filters the rows in the table when this security role is in effect.
public string FilterExpression { get; set; }
Property Value
Defines whether the metadata of this table should be secured from users belonging to this role.
public MetadataPermission MetadataPermission { get; set; }
Property Value
NoEffect
public bool NoEffect { get; }
Property Value
Parent
The parent Model Role of the current Table Permission.
public ModelRole Parent { get; }
Property Value
Role
A reference to a Role object that owns this TablePermission.
public ModelRole Role { get; }
Property Value
RoleName
[Browsable(true)]
public string RoleName { get; }
Property Value
State
Provides information on the state of the permission. Possible values and their interpretation are as follows. Ready (1) The permission has a valid expression. NoData (3) Not applicable. CalculationNeeded (4) Not applicable. SemanticError (5) The expression of the TablePermission object has a semantic error. EvaluationError (6) Not applicable. DependencyError (7) A dependency associated with this TablePermission object is in an error state (SemanticError, EvaluationError, or DependencyError). Incomplete (8) Not applicable. SyntaxError (9) The TablePermission object is in an error state because of a syntax error in its expression. The TablePermission object is not queryable. This state applies only to TablePermission objects of the type Calculated.
public ObjectState State { get; }
Property Value
Table
The parent table of the current Table Permission.
[Browsable(false)]
public Table Table { get; }
Property Value
TableName
[Browsable(true)]
public string TableName { get; }
Property Value
Methods
CanEditName()
protected override bool CanEditName()
Returns
ClearAnnotations()
Removes all annotations from this object.
public void ClearAnnotations()
ClearExtendedProperties()
Removes all Extended Properties from this object.
public void ClearExtendedProperties()
Clone(string, ModelRole)
Creates an exact copy of this TablePermission object.
public TablePermission Clone(string newName = null, ModelRole newParent = null)
Parameters
Returns
CreateNew(ModelRole, string)
Creates a new TablePermission and adds it to the parent ModelRole.
Also creates the underlying metadataobject and adds it to the TOM tree.
public static TablePermission CreateNew(ModelRole parent, string name = null)
Parameters
Returns
CustomReinit()
protected override void CustomReinit()
DelayedInit()
public void DelayedInit()
GetAnnotation(int)
Gets the value of the annotation with the given index, assuming it exists.
public string GetAnnotation(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetAnnotation(string)
Gets the value of the annotation with the given name. Returns null if no such annotation exists.
public string GetAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetAnnotations()
Gets a collection of all annotation names on the current Table Permission.
public IEnumerable<string> GetAnnotations()
Returns
GetAnnotationsCount()
Gets the number of annotations on the current Table Permission.
public int GetAnnotationsCount()
Returns
GetExtendedProperties()
Gets a collection of all ExtendedProperty names on the current object.
public IEnumerable<string> GetExtendedProperties()
Returns
GetExtendedProperty(int)
Gets the value of the ExtendedProperty with the given index, assuming it exists.
public string GetExtendedProperty(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedProperty(string)
Gets the value of the ExtendedProperty with the given name. Returns null if no such ExtendedProperty exists.
public string GetExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetExtendedPropertyCount()
Gets the number of ExtendedProperties on the current object.
public int GetExtendedPropertyCount()
Returns
GetExtendedPropertyType(int)
Gets the type of the ExtendedProperty with the given index, assuming it exists.
public ExtendedPropertyType GetExtendedPropertyType(int index)
Parameters
Type |
Name |
Description |
int |
index |
|
Returns
GetExtendedPropertyType(string)
Gets the type of the ExtendedProperty with the given name, assuming it exists.
public ExtendedPropertyType GetExtendedPropertyType(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
GetNewAnnotationName()
Returns a unique name for a new annotation.
public string GetNewAnnotationName()
Returns
GetNewExtendedPropertyName()
Returns a unique name for a new ExtendedProperty.
public string GetNewExtendedPropertyName()
Returns
HasAnnotation(string)
Returns true if an annotation with the given name exists. Otherwise false.
public bool HasAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
HasExtendedProperty(string)
Returns true if an ExtendedProperty with the given name exists. Otherwise false.
public bool HasExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
Init()
Derived members should override this method to instantiate child objects
protected override void Init()
OnPropertyChanged(string, object, object)
Fired after a property is changed
protected override void OnPropertyChanged(string propertyName, object oldValue, object newValue)
Parameters
RemoveAnnotation(string)
Remove an annotation by the given name.
public void RemoveAnnotation(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
RemoveExtendedProperty(string)
Remove an ExtendedProperty by the given name.
public void RemoveExtendedProperty(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
SetAnnotation(int, string)
Sets the value of the annotation with the given index, assuming it exists.
public void SetAnnotation(int index, string value)
Parameters
SetAnnotation(string, string)
Sets the value of the annotation having the given name. If no such annotation exists, it will be created. If value is set to null, the annotation will be removed.
public void SetAnnotation(string name, string value)
Parameters
SetExtendedProperty(int, string, ExtendedPropertyType)
Sets the value of the ExtendedProperty with the given index, optionally specifiying the type (string or JSON) of the ExtendedProperty.
public void SetExtendedProperty(int index, string value, ExtendedPropertyType type)
Parameters
SetExtendedProperty(string, string, ExtendedPropertyType)
Sets the value of the ExtendedProperty having the given name. If no such ExtendedProperty exists, it will be created. If value is set to null, the ExtendedProperty will be removed.
public void SetExtendedProperty(string name, string value, ExtendedPropertyType type)
Parameters