locked
Cannot set read-only members as values of domain-based attributes RRS feed

  • Question

  • Hello all,

    I'll start with an example, in case the description isn't clear:

    I have 2 entities named Skill and SkillGroup. Skill has a domain-based attribute named SkillGroup, which is based on the SkillGroup entity.
    With the use of a derived hierarchy, I've assigned read-only permissions to certain members of the SkillGroup entity.
    Now, when I add/edit a Skill and try to set its SkillGroup attribute using one of SkillGroup entity's read-only members, I receive this error:
    "The user does not have permission or the object ID not valid.. "
    The error doesn't appear when I use any other members of SkillGroup, so it must be permission-based.

    In conclusion, I do want to prevent users from making changes to certain members of the SkillGroup entity, but still enable them to set those members as values for the Skill entity's domain-based attribute. Is there any workaround for this?

    PS: I'm using MDS with the first Cumulative Update (CU) for MDS.

    Thanks & Regards,

    Adam Głębowicz

    Monday, October 18, 2010 8:08 AM

Answers

  • Adam,

    the id is <Id>00000000-0000-0000-0000-000000000000</Id>

    I wonder if just renaming "New" in "State" Entity to another name would be sufficient.

     Could you give a try please ?


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Monday, October 18, 2010 1:06 PM
  • Hello again Adam,

    1) I've already had some issues with members names which was some reserved keywords: i wonder if "State" is not in this case ...

    could you try to rename  "State" and "SkillState" to, by example, "Stt"  and "SkllStt" ?

    here are some reserved keywords, but I know that there are some others, and I don't know the full list yet.

    http://social.msdn.microsoft.com/Forums/en/sqlmds/thread/29257296-4a39-469d-a225-27cb17cf3071

    2) you could also check the log file of mds to see more details on the error ? (in your app server/ by default in 

    C:\Program Files\Microsoft SQL Server\Master Data Services\WebApplication\, but the path depends on your custom configuration)

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________

    Regards,

    Xavier Averbouch,

    Consultant,

    Avanade France

    Monday, October 18, 2010 11:51 AM
  • thank you for the test pkg.

    could you check the effective permissions on your model and your hierarchies ?


    I think there is something that is not good, but I don't know what yet.

    if you see something like 99 in hierarchies effective permission summary, maybe there is a cross reference issue between permissions.

    usefull link for mds permissions:

    http://msdn.microsoft.com/en-us/library/ff486950.aspx

    did you try to use some business rules to manage the status of your data  ?

    please see this link :

    http://sqlblog.com/blogs/mds_team/archive/2010/02/18/enabling-human-workflow-part-4-creating-the-business-rules.aspx

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________

    Regards,

    Xavier Averbouch,

    Consultant,

    Avanade France

    Monday, October 18, 2010 7:44 PM

All replies

  • Hello Adam

    did you try something like :

    (it's working good for me, users can update specific fields but not other fields)

     

    Regards,


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Monday, October 18, 2010 9:40 AM
  • Thanks for the reply :)
    Unfortunately that doesn't help as my problem comes with permissions set on derived hierarchy level and not on model level. I've re-written the post with more detail - hope this helps.

    This is how my model permissions look:

    State is a domain-based attribute based on the SkillState entity. It is read-only for both Skill and SkillGroup entities. I use it in my derived hierarchy for both Skill and SkillGroup to prevent users from applying changes to Skills and SkillGroups with States "Approved" and "Rejected".
    My derived hierarchy permissions look like this (for both Skills and SkillGroups):

    With these settings, users see Skillgroups as below (I've marked 2 SkillGroups, that I will use in my example):

    Users see Skills as below (I've marked a Skill, that I will use in my example):

    Now, when the user tries to edit the "New skill 1" Skill, and assign it to the "Consulting" SkillGroup (which has state Approved, and so is read-only), he receives the following error:

    Whereas, if he tried assign it to the "New skill group 1" SkillGroup (which has state New, and so is available for update), he doesn't receive any error - the edit is successful:

    The final conclusion is like in my previous post:
    I want to prevent users from making changes to certain members of the SkillGroup entity (that's what I used the derived hierarchy permissions for), but still enable them to set those read-only members as values for the Skill entity's domain-based attribute. Is there any workaround for this?

    Monday, October 18, 2010 11:43 AM
  • Hello again Adam,

    1) I've already had some issues with members names which was some reserved keywords: i wonder if "State" is not in this case ...

    could you try to rename  "State" and "SkillState" to, by example, "Stt"  and "SkllStt" ?

    here are some reserved keywords, but I know that there are some others, and I don't know the full list yet.

    http://social.msdn.microsoft.com/Forums/en/sqlmds/thread/29257296-4a39-469d-a225-27cb17cf3071

    2) you could also check the log file of mds to see more details on the error ? (in your app server/ by default in 

    C:\Program Files\Microsoft SQL Server\Master Data Services\WebApplication\, but the path depends on your custom configuration)

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________

    Regards,

    Xavier Averbouch,

    Consultant,

    Avanade France

    Monday, October 18, 2010 11:51 AM
  • Hello again Xavier,

    Ad.1) Before I created my Model I was aware of the reserved keywords problem. I found a post before, where someone had this problem when using "Status" and everything was fine for him once he switched to "State". Nevertheless, I will create a completely fresh model to test this.

    Ad. 2) The log finds this error in my case:

    MDS Error: 0 : <ArrayOfError xmlns="http://schemas.microsoft.com/sqlserver/masterdataservices/2009/09" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Error>
        <Code>120003</Code>
        <Context>
          <FullyQualifiedName />
          <Identifier i:type="MemberIdentifier">
            <Id>00000000-0000-0000-0000-000000000000</Id>
            <Name>New skill 1</Name>
            <InternalId>0</InternalId>
            <Code>New skill 1</Code>
            <MemberType>Leaf</MemberType>
          </Identifier>
          <Type>MemberCode</Type>
        </Context>
        <Description>The user does not have permission or the object ID not valid.</Description>
      </Error>
    </ArrayOfError>
        DateTime=2010-10-18T12:43:21.1338225Z

    PS: I thought this problem is rather a feature/bug of MDS, but as I understand you don't have any such problems? I will check again on a fresh model just to be sure this problem is repetitive for me.

    Regards,

    Adam

    Monday, October 18, 2010 12:56 PM
  • Adam,

    the id is <Id>00000000-0000-0000-0000-000000000000</Id>

    I wonder if just renaming "New" in "State" Entity to another name would be sufficient.

     Could you give a try please ?


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Monday, October 18, 2010 1:06 PM
  • Hello,

    I'm now working on a fresh model. All names are changed to test ones and "New" member changed to Name: "test", Code: "test", as suggested.
    The model has only:
    - 3 test entities (equivalent of Skill, SkillGroup and State),
    - 2 derived hierarchies (equivalent of Skill per State and SkillGroup per State)
    - read-only permissions applied only to hierarchies (allowing update only on "test" state)

    The problem still persists, however :/.

    Adam

    Monday, October 18, 2010 1:52 PM
  • could you send me the full package of this fresh model in order to test it ?

    (a download link,  by example)

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Monday, October 18, 2010 1:55 PM
  • Sure, here is the link:

    http://www.2shared.com/file/OMlD3v3D/Test.html

    Regards,

    Adam

    Monday, October 18, 2010 2:03 PM
  • thank you for the test pkg.

    could you check the effective permissions on your model and your hierarchies ?


    I think there is something that is not good, but I don't know what yet.

    if you see something like 99 in hierarchies effective permission summary, maybe there is a cross reference issue between permissions.

    usefull link for mds permissions:

    http://msdn.microsoft.com/en-us/library/ff486950.aspx

    did you try to use some business rules to manage the status of your data  ?

    please see this link :

    http://sqlblog.com/blogs/mds_team/archive/2010/02/18/enabling-human-workflow-part-4-creating-the-business-rules.aspx

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________

    Regards,

    Xavier Averbouch,

    Consultant,

    Avanade France

    Monday, October 18, 2010 7:44 PM
  • Hello again,

    1) The permissions summary in my effective permissions is the same - 99 for all rows.

    2) In the Test model that we're currently testing I use no business rules so they shouldn't cause the problem (as for the original model, yes, I was using business rules for State to set it to "New" by default in all entities that used State).

    3) As for the links, I've looked through both the mds_team blog and msdn library for MDS before starting this thread. These are the only two comprehensive sources that I found for MDS in the first place.

    4) As for cross-referencing permissions, that also shouldn't cause the problem, because:
    - I'm currently using only user-level permissions
    - I'm currently using only hierarchy level permissions (plus update permission for the whole Test model)
    - I've just deleted the Test hierarchy (equivalent of Skills), leaving only the testGroup hierarchy (equivalent of SkillGroup), as only this hierarchy is a must to test the issue, so I now have permissions set on only one hierarchy in the whole Test model.

    5) Do you have the same problem as I do when using the Test package?

    Regards,

    Adam

    Tuesday, October 19, 2010 8:01 AM
  • Hello Adam

    in fact, when you export a mds package, it does not export the permissions, so i'm not sure to have exactly reproduced your permission configuration

    could you send me again a test package with some datas (the first was empty of data), and I will try to reproduce your permission set manually  ? 

     

    what was the problem with the business rules on your first model ?


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Tuesday, October 19, 2010 8:08 AM
  • Hello,

    The Test package was created along with the data for the Model (a few members for each entity). I just downloaded it from the link I gave you, deployed it to my MDS and the data is imported also, so the package should be ok.
    Are you also using MDS with Cumulative Update 1?

    As for permissions, I currently only set these permissions on user level:
    - update permission for the whole model
    - read-only permission for the "App" node of the testGroup derived hierarchy
    - read-only permission for the "Rej" node of the testGroup derived hierarchy

    As for business rules - I didn't have any problems connected with business rules.
    I was asking whether you have ever encountered the same problems as I have, concerning the topic of this discussion?

    PS: Sorry for replying after longer intervals, but I'm currently having training and am not fully available.

    Regards,

    Adam

    Tuesday, October 19, 2010 10:03 AM
  • Hello

    sorry for late answer, i will try to test your package further as soon I get some time to do it

     


    Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem. _________________________________________________________ Regards, Xavier Averbouch, Consultant, Avanade France
    Wednesday, October 20, 2010 8:39 AM