none
Project 2010 and above. Inconsistent Authorization, VBA in Enterprise Global not reaching Client if not done with the Macro recorder. RRS feed

  • Question

  • In 2010 I can write VBA code in the Project code Page or in a Module or with the recorder and the Macros work.

    In 2013 only Recorder works as it should, any ideas.

    Here is the code that works in both 2010 and 2013, but if I put it in the 2013 Enterprise Global it will not save into the Project Code page or a module.

    If I add the code to an open project it works and it stays available in global. But I need the server repository for custom code.

        Dim taskField As Long
        Dim taskFieldName As String
        Dim T As Task
        Dim TS As Tasks
        Set TS = ActiveProject.Tasks
       
        For Each T In TS
         If Not T Is Nothing Then
          If T.Assignments.Count <> 0 Then
            taskField = FieldNameToFieldConstant("abNickname", pjTask)
            T.SetField FieldID:=taskField, Value:=T.ResourceInitials
          End If
         End If
        Next T

    This has to be permissions, or broken COM, but I can't see how a recorded Macro is any different than custom code, unless the code above itself is no longer compatable? I gues I'll take a spin through verbose logging but there is no warning on saving the Enterprise global.

    SOLVED,

    Permissions, First few days of Rollout I was using a different account. When I came back to it tooday one of the VM clients I was looking at under that rollout account (Win8) didn't have the task bar customized/populated, so I assumed I hadn't done much client work under that account. Just too many hats cause 2 days of frustration.

    NOT SOLVED

    yeah it's permissions, but with account using absolutely every possible power I'm getting inconsistent authorization. I'm going to try Win7, as a client and see if that helps.

    Log has all kinds of Permissios entries, some like farm administrators can't adjust user permissions. Try again later and it will work fine. So at that moment an account tries to save the Enterprise Global it is denied, but at some points in time I get thru. No pattern.



    • Edited by Toomanyhats Wednesday, November 14, 2012 4:57 PM
    Wednesday, November 14, 2012 2:27 PM

Answers

  • So the problem I believe was that a pure code edit to the VBA interface was not registering as a changed Enterprise Global, if I make a VBA edit and also a ribbon based edit to the Enterprise Global the save and check in is completeing.

    The log security entry denied SaveProtectedBaseline may have been a red herring.

    Anyways, I got the VBA code to save, twice in a row now so I guess this is Solved

    • Marked as answer by Toomanyhats Thursday, November 15, 2012 3:28 PM
    Thursday, November 15, 2012 3:27 PM

All replies

  • I removed toomanyhats from the pwa groups, then removed him from the site collection users, then rmoved him from application management userpolicy

    I think this is what is going wrong

    Permission denied: User i:0#.w|mydomain\toomanyhats does not have category permission 'SaveProtectedBaseline' on project 75cdd7db-1b68-4b70-a8d6-2fe52da83acd. StackTrace:   at Microsoft.Office.Project.Server.SecurityAuthorization.AccessCheckProject(Guid categoryPermissionUid, Guid projUid)     at Microsoft.Office.Project.Server.BusinessLayer.WinProj.PreReadProjectInternal(Guid projGuid, Int32 projType, Int32 datastore, Boolean checkout, Boolean isCheckedOutEglobal, Guid sessionGuid, String sessionDescr, UInt32 flags, Int32 lcid, Int16 dataFormatVersion, String winprojBuildNumber, Boolean keepWriteLock, Boolean isCallingFromPCS)     at Microsoft.Office.Project.Server.Wcf.Implementation.WinProjImpl.<>c__DisplayClass29.<PreReadProject2>b__27()  

    I have to confirm that 75cdd7db-1b68-4b70-a8d6-2fe52da83acd is the enterprise global...

    Now I've tried 3 different Administrators and they all end up the same, Global is not getting saved to the enterprise

    The uid above is the EGLOBAL, I removed myself from all categories and successfully save E Global once, Then it fails again with denied SaveProtectedBaseline, It seems to me the category permission is SaveUnProtectedBaseline
    • Edited by Toomanyhats Wednesday, November 14, 2012 7:49 PM
    Wednesday, November 14, 2012 7:09 PM
  • When assigning groups, only assign Administrator. Assigning the other groups adds nothing and can cause security issues. Remember that once code is saved to E Global, you need to close then re-open Project Pro to see it in the E Global cache.

    Rod Gill

    The one and only Project VBA Book

    Rod Gill Project Management

    Wednesday, November 14, 2012 9:55 PM
    Moderator
  • Thanks, the user is only in admin group and no security category assignment. Next try is to use a forms based authenticated user as an administrator.

    Not Solved

    I can't use Forms Based Authentication to set up a Project Pro 2013 Server Account. It just logs you in as the current user. Not option., as far as I can see.


    • Edited by Toomanyhats Thursday, November 15, 2012 2:37 PM
    Thursday, November 15, 2012 2:09 PM
  • So the problem I believe was that a pure code edit to the VBA interface was not registering as a changed Enterprise Global, if I make a VBA edit and also a ribbon based edit to the Enterprise Global the save and check in is completeing.

    The log security entry denied SaveProtectedBaseline may have been a red herring.

    Anyways, I got the VBA code to save, twice in a row now so I guess this is Solved

    • Marked as answer by Toomanyhats Thursday, November 15, 2012 3:28 PM
    Thursday, November 15, 2012 3:27 PM