Function Role - Application Mapping using SQL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2015 09:40 AM
I am looking for a query that allows mapping user function roles with Application. Essentially a query that allows mapping FunctionRole.pkid with TypeApplication.enum ?
- Labels:
-
AXL

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2015 08:55 AM
It was an interesting problem for me as I couldn’t find any data dictionary mapping between function role between mapping and application.
So here is how it needs to be done,
Create Function Role using,
INSERT INTO functionrole (pkid,name,description,isstandard) VALUES (newid(),' Dummy Role',' Dummy Role','f')
And then map it with resources using,
INSERT INTO functionroleresourcemap (pkid,fkfunctionrole,permission,tkresource) select newid(),functionrole.pkid,2,typeresource.enum from functionrole,typeresource where functionrole.name='Dummy Role' AND typeresource.name IN('Device Pool web pages','Device Profile web pages')
Executing these two queries automatically binds the role to “Cisco Call Manager Administration”. In other words, CUCM decides the application based on resource permissions you select for the role.
Strange, but interesting one.
