Quantcast
Channel: NetSqlAzMan - .NET SQL Authorization Manager
Viewing all articles
Browse latest Browse all 163

New Post: Problem with role delegate and mmc snap in

$
0
0
Hello,

When I create a new delegation (between dbuser) the mmc snap in crash while accessing the corresponding role authorization.

There is the code I'm using for the delegation creation :
IAzManDBUser identity = storage.GetDBUser("me");

IAzManDBUser test = storage.GetDBUser("test");
IAzManStore store = storage.GetStore("TestStore");
IAzManApplication app = store.GetApplication("TestApp");

IAzManItem operation = app.GetItem("Admin");
List<KeyValuePair<string, string>> delegateAttributes;
AuthorizationType authType = operation.CheckAccess(identity, DateTime.Now, out delegateAttributes);
            if (authType == AuthorizationType.AllowWithDelegation)
            {                
                IAzManAuthorization auth = operation.CreateDelegateAuthorization(identity, test.CustomSid, RestrictedAuthorizationType.Allow, DateTime.Now, null);
                foreach (KeyValuePair<string, string> attr in delegateAttributes)
                    auth.CreateAttribute(attr.Key, attr.Value);
            }
This code produces no error at run time and the delegated role works correctly ("test" user can use the "admin" role from "me"). But when I open the mcc snap in and go into "Admin" authorization I've got the following error :
Destination array is not long enough to copy all the required data. Check array length and offset.
Parameter name: binaryForm
Could you help me ?

Thanks

Viewing all articles
Browse latest Browse all 163

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>