| ControllerBaseCheckObjectSaveOperationSecurity Method |
Checks that the active user is allowed to Create a new - or Update an existing configuration object.
Throws a SecurityException if not.
Method can be used for all configuration objects that are represented by a ConfigurationObjectType (except those that have a compound key).
Method checks auth role security as well as whether it is allowed to modify builtin/feature package objects.
Namespace:
Omada.OE.AppLogic
Assembly:
Omada.OE.AppLogic (in Omada.OE.AppLogic.dll) Version: 15.0.0.0
Syntaxprotected void CheckObjectSaveOperationSecurity(
int id,
ConfigurationObjectType cot,
int authElementDbId = 0,
Nullable<int> ownerId = null,
Nullable<ConfigurationObjectType> ownerCot = null
)
Parameters
- id
- Type: SystemInt32
If this object has a non-zero id (= exists already) then the (Update) check is always done for that object.
If, however, the object doesn't have a non-zero id (= it is about to be created) and an owner object is specified, then an Update check is made for the owner object instead.
If the object doesn't have a non-zero id and no owner object is specified then a Create check is made.
- cot
- Type: Omada.OE.ModelConfigurationObjectType
The ConfigurationObjectType of the specified obj.
Must be a type that doesn't have a compound key (please refer to ConfigurationChange.ObjectTypeHasCompoundKey).
- authElementDbId (Optional)
- Type: SystemInt32
If the object is represented by an auth element then that must be specified here.
- ownerId (Optional)
- Type: SystemNullableInt32
If the object is owned (aggregated) by another object (i.e. a form field is owned by a form) then the owner object object must be specified here.
The owner is used by the method when the specified object is one that is about to be created:
In that case we check if there is Update access to the owner (as the creation is essentially an update of the owning object).
A specified ownerId must be non-zero.
- ownerCot (Optional)
- Type: SystemNullableConfigurationObjectType
Type of the owner.
Must be specified when owner is specified.
Must be a type that doesn't have a compound key.
See Also