Hi colleagues,
I am trying to to restrict users from accessing a view using the "with structured privilege" option without using the Web IDE. I created a structured privilege and assigned it to a role, and assigned this role to a user but I am still getting "Insufficient Privilege" Error.
Please find below my code:
// DB View
define view countryView AS SELECT FROM country
{
name,
partof.continent as continent
} with structured privilege check;
// Structured Privilege
STRUCTURED PRIVILEGE
"tinyworld.tinydb.roles::countryView.CE_VIEW_PRIVILEGE"
FOR SELECT ON
"tinyworld.tinydb::tinyf.countryView"
WHERE "continent" = 'Europe'
// role definition
{
"role":{
"name": "tinyworld.tinydb.roles::tinyworld",
"object_privileges":[
{
"name": "tinyworld.tinydb::tinyf.world",
"type": "TABLE",
"privileges": [ "SELECT" ]
},
{
"name": "tinyworld.tinydb::tinyf.country",
"type": "TABLE",
"privileges": [ "SELECT" ]
},
{
"name": "tinyworld.tinydb::createCountry",
"type": "PROCEDURE",
"privileges": [ "EXECUTE" ]
},
{
"name": "tinyworld.tinydb::tinyf.countryView",
"type": "VIEW",
"privileges": [ "SELECT" ]
}
],
"schema_analytic_privileges": [
{
"privileges":[ "tinyworld.tinydb.roles::countryView.CE_VIEW_PRIVILEGE" ]
}
]
}
}
Assignment to the User:

Any ideas would be really appreciated,
Thank you,
Shady