6 Replies Latest reply on Oct 20, 2017 8:17 AM by Scott Diehl

    Locked design and Administrator permission

    Giulia Purin

      When a design is created it’s locked for all but the user who owns the design. This means that the design is available in view-only mode for other users.

      If you want the administrator to edit the design you have to use the “Change owner” option, which is quite unpractical.

       

      Does anyone know if there is an other way to extend editing rights to the administrator too?

       

      Thanks,

       

      Giulia

       

       

       

       

       

       

       

       

       

                                              

       

        • Re: Locked design and Administrator permission
          Josh Pritt

          If you are familiar with the Process Framework Admin Tool you could do this with a new task on the design node type:

          Always make a backup of your Process schema tables first since you could potentially mess up the workflow for Designer with this tool.

           

          Create a new task on the design node type, call it something like "Open Design (admin)" and make sure only the admin Px Role is selected for this task (so that only Px users with this role can use this task).

          Then just put these subtasks in the task:

          Change Owner to Self

          Open Design

           

          Basically, create an admin-only open design task that first changes the owner of the design to that user then opens it for editing.

           

          This keeps the Admin from having to separately change owner manually but they would have to change the owner back after they were finished.

          You could also create an Admin-only Close Design task (that you would have to run from the ArcFM Tasks drop down tool in ArcMap instead of the Close Design button) that has the Change Owner subtask on it.  This way the admin user could close the design with this task and it would pop up the user list to assign the owner back to the original owner (or someone else).  Or the admin user could just use the regular close design button to stay as the current owner.

           

          The reason only the owner can edit a design is to keep two users from editing the design at the same time which would cause serious data inconsistency errors.

            • Re: Locked design and Administrator permission
              Scott Diehl

              Hi Josh,

               

              Have you tried using the Change Owner to Self subtask recently?  I'm working on Dominion (10.2.1c) and when I configure this subtask (by itself, or per your suggestion above, I also tried it with the Open Design subtask), it always prompts me for the user I want to change ownership to (it lists all users in the same role as the current user I'm logged in as).

               

              The subtask name clearly indicates what I would expect the subtask to do, which is to assign ownership to the user who is logged in.  In my mind, it should never prompt the user for anything.  It sounds like you're describing this (my) expected behavior, too.  Any ideas why this subtask would be prompting/expecting the user to select the new owner?  Also, the current user is the ONLY user in the role that I CANNOT choose to be the owner. I.e., it forces me to select anyone in my same role EXCEPT myself.

               

              Seems to me this is a bug and it is somehow calling the wrong code.  As far as I can tell it may be the exact same behavior as the Change Owner subtask.  Thoughts?

                • Re: Locked design and Administrator permission
                  Josh Pritt

                  I looked at the code just now for the Change Owner to Self subtask.  It just grabs the currently logged in user name then calls Change Owner and passes in the selected node and that specific user. But there's code inside Change Owner that tries to find that user in the Px tables by Name, and DisplayName (which should work since it was pulled from the currently logged in user) but then looks it up by roles allowed to modify that selected node.  If the user isn't found or if the user doesn't have the right Px role to own/update that node then it will prompt the user to pick a new owner from the list of users that are allowed to own it.

                  One thing to check might be the roles allowed on each STATE in the states tab of the Px Admin Tool.  That's normally overlooked since you can apply different Px roles at every single state for every node type.  Also check the roles allowed on each Transition in the transitions tab.  Basically look at every single place where you can set roles.  It's normally the State or Transition where the role list checkboxes are overlooked.

                    • Re: Locked design and Administrator permission
                      Scott Diehl

                      Thanks for looking into the code and explaining how it works, Josh!  Super helpful.

                       

                      I did find that the user's role did not have permissions on the current STATE of the design, so after adding permissions for that role, the subtask worked as expected, transferring ownership to the current user w/out any prompt.

                      • Re: Locked design and Administrator permission
                        Scott Diehl

                        So... once I got the correct role(s) assigned to the STATE in which the design I was working with resides, I can see the Change Owner to Self task is working.  What I can't seem to do is get it to work in a single Task, configured together with Open Design, as you suggested in your original answer. 

                         

                        Approach 1: Task 1 (Change Owner to Self) + Task 2 (Open Design) = success... design is owned by my user and opens when two separate tasks are used.

                         

                        Approach 2: Task 3 (Change Owner to Self + Open Design) = partial success... design ownership is transferred to my user, but design does not open.  NOTE: If Task 3 is executed a second time, the design opens.

                         

                        So it seems Open Design does not recognize the design ownership has changed... therefore my question is:

                         

                        What can be done within Task 3 to allow the Open Design subtask to recognize that the design is now owned by my user once the Change Owner to Self subtask executes?

                         

                        I tried adding the Unlock Node subtask (ordered) between Change Owner to Self and Open Design, but it just made the task not show up b/c, I assume, it is a conditional subtask dependent on the user already owning the design/node.

                          • Re: Locked design and Administrator permission
                            Scott Diehl

                            My best assessment is that the Open Design subtask, when included in the task, only sees the initial owner of the design.  Therefore, even though the Change Owner to Self subtask executes correctly, the Open Design subtask is unaware the current user is now the owner at the time it is executed.

                             

                            Is there another way to make taking ownership and opening a design a one-click solution?