Trying to give a bit of clarification of what we really need here:

I guess we would really like access to new "type" for the role schema Types

e.g. let's call it a

"tupleValue"

a) the first element of the tuple representing the "name-part" or "tag" of the entitlement value b) the second element of the tuple value would represent the full description of that name-part or tag
The resulting "tupleValue" would be a composition of the 2 elements:


i.e.
<"name-part">:<"description part - which can be a long string describing the name part..................................">

e.g.
publisher: this an entitlement which allows a user to perform action A under circumstances X, Y, Z


QUESTION(s):
- is an extension of the basic role schema types possible today?
- is this something that could be considered by dev as a useful RFE?
or
- is this impossible, forget it?


today we can do:
[nik@anvil uforge-syncope]$ curl -u admin:password -H "Content-Type: application/xml" -X GET http://10.0.0.183:9090/syncope/rest/schema/{role}/read/{resourceEntitlement} | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload  Upload   Total Spent    Left  Speed
100 268 0 268 0 0 14225 0 --:--:-- --:--:-- --:--:-- 14888
{
    "conversionPattern": null,
    "enumerationKeys": "",
    "enumerationValues": "<first tuple element>:<second tuple element>",
    "mandatoryCondition": "false",
    "multivalue": true,
    "name": "resourceEntitlement",
    "readonly": false,
    "type": "Enum",
    "uniqueConstraint": false,
    "validatorClass": null
}
[nik@anvil uforge-syncope]$

in the future we can do:

[nik@anvil uforge-syncope]$ curl -u admin:password -H "Content-Type: application/xml" -X GET http://10.0.0.183:9090/syncope/rest/schema/{role}/read/{resourceEntitlement} | python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload  Upload   Total Spent    Left  Speed
100 268 0 268 0 0 14225 0 --:--:-- --:--:-- --:--:-- 14888
{
    "conversionPattern": null,
    "tupleValue": "<first tuple element>:<second tuple element>",
    "mandatoryCondition": "false",
    "multivalue": true,
    "name": "resourceEntitlement",
    "readonly": false,
    "type": "TUP",
    "uniqueConstraint": false,
    "validatorClass": null
}
[nik@anvil uforge-syncope]$

rgds,
Nik



Hi,

I have a role attribute "resourceEntitlement" in RSchema. This is an attribute of enum type.

I see the values are stored in "enumerationValues" field of table RSchema.

Now I would like to provide a description for each value.

I would be tempted to use the "Enumeration labels" provided by console. I see that internally this is stored into "enumerationKeys" field of table RSchema.

Is there any validation done by Syncope regarding the enumerationKeys ?

I mean, at role creation, when I set the RoleTO attributes, if any value does not correspond to one of the values defined in "enumerationValues" of attribute definition, an error will be returned, of course.

Any concern about the enumerationKeys ?

Thanks and regards,

German.





Reply via email to