Hello,
I am trying to remove a user skill but get an InsufficientRightsException when trying to commit. I am logging in using current credentials:
var applicationName = System.Diagnostics.Process.GetCurrentProcess().ProcessName;
var credentials = CommonCredentials.GetCredentials(applicationName,
LoadFlags.Default | LoadFlags.Application,
LoadPreference.Newest);
var session = new Session();
session.Connect(credentials.SessionSettings,
credentials.HostSettings,
credentials.AuthSettings,
credentials.StationSettings);
var cm = ConfigurationManager.GetInstance(session);
var ucl = new UserConfigurationList(cm);
var fd = new List<FilterDefinition<UserConfiguration, UserConfiguration.Property>>();
fd.Add(new BasicFilterDefinition<UserConfiguration, UserConfiguration.Property>(UserConfiguration.Property.DisplayName, "isazonov", FilterMatchType.Exact));
var qs = new QuerySettings<UserConfiguration, UserConfiguration.Property>(new GroupFilterDefinition<UserConfiguration, UserConfiguration.Property>(fd));
ucl.StartCaching(qs);
var list = ucl.GetConfigurationList();
list[0].PrepareForEdit();
list[0].Skills.Value.RemoveAt(0);
list[0].Commit(); // throws an exception here
ucl.StopCaching();
session.Disconnect();
Is there something I am missing? The skill is not an inherited one and is defined directly on the user if that makes any difference.
Can anyone point me in the right direction?
Thank you!