Hi,
Is there a way to define a new acs_object type using the Tcl api?
The case is for making new object_ids with new object types but without any additional attributes. Each object_id represents a fluid set of objects unconstrained to openacs-core data model.
If no tcl api exists is there any reason one shouldn't be created for this task? ie is there any reason to not put the PL/SQL in a db_dml statement in a tcl proc in a package-init.tcl file, where the PL/SQL is only executed if the object_type doesn't exist?
If a tcl proc is not recommended/possible etc, what is the preferred way to define a new acs_object_type?
There appears to be at least these three approaches (one maybe Oracle PL/SQL, the other Pg PL/SQL, and the other ?):
Call acs_object_type.create_type() (in what context???) https://openacs.org/doc/object-system-design#object-system-design-api
and
select content_type__create_type followed by
select content_folder__register_content_type
https://openacs.org/doc/tutorial-database
and yet,
grepping code in packages seems to suggests a more popular alternate:
select acs_object_type__create_type
and *no* use of an acs_object_type__register*
Background:
Some packages are using a simple role-based-access-control permissions system (q-control) with unit tests to show full integrity. RBAC is a subset of OpenACS's permissions capabilities.
q-control may be a useful way to translate commonly used RBAC permissions paradigms to OpenACS permissions, and that q-control's unit tests provides a framework to copy for testing OpenACS permissions in an RBAC configuration.
Thank you,
Ben