dbTalk Databases Forums  

Permissions set with DSO are not the same as in management console

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Permissions set with DSO are not the same as in management console in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Markus Jenni
 
Posts: n/a

Default Permissions set with DSO are not the same as in management console - 01-24-2006 , 09:51 AM






I'am tried to set the set the permissions of a dimension for a database role
with DSO.

The code to set the permissions seems to work, because when i start the code
again an read the permissions first, they are the same as I set previously.
But with the Analyisis Managment Console i don't see the same permissions as
with DSO.

The problem does not occur, when I first remove the database role and create
a new one.

Can anybody help me, to solve this "mistery"?

Here's my code
DSO.Server _server = new DSO.Server();
_server.Connect("Server");
DSO.MDStore _database = (DSO.MDStore)_server.MDStores.Item("openControl");

//Adding user
DSO.Role _role;
if (!_database.Roles.Find("TEST"))
{
_role =
(DSO.Role)_database.Roles.AddNew("TEST",DSO.SubCla ssTypes.sbclsRegular);
}
else
{
_role = (DSO.Role)_database.Roles.Item("TEST");
}
UpdateDSObject((DSO.ICommon)_database);

_role.SetPermissions("EnforcementLocation","Server ");

//Restricting dimensions
string dimension = "Dimension:Einheit";
string expression = "<MEMBERSECURITY IsVisible=\"true\"
VisualTotalsLowestLevel=\"[Einheit].[Level 10]\"><PERMISSION Access=\"Read\"
UpperLevel=\"[Einheit].[(All)]\" LowerLevel=\"[Einheit].[Level 10]\"
AllowedSet=\"{[Einheit].&[388]}\"/></MEMBERSECURITY>";
Console.WriteLine(_role.get_Permissions(dimension) );
_role.SetPermissions(dimension,expression);
_role.Update();
_database.Update();



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.