Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
Danny Philips Trusted Contributor.
Trusted Contributor.
321 views

ALM version 12.55 Template Module Access

Jump to solution

I am running ALM version 12.55 patch 3 and trying to set up a template project with multiple linked projects but with different access to modules based on user access group.  I have a template project setup with 2 linked projects.  All custom access groups are housed in the template.  The issue I have is that not all groups will have the same access in all linked projects.  For example access group 1 may have Test Lab and Test Plan access in linked project 1 but not in linked project 2.  I have found some workflow code that turns on/off module access:

'>>> Hide individual modules (for all groups) <<<
   Dim Cust 'As Customization
   Dim CustModules 'As CustomizationModules
   Set Cust = TDConnection.Customization
   Cust.Load
   Set CustModules = Cust.Modules

   const DEFECTS = 0
   const TESTPLAN = 1
   const TESTLAB = 2
   const REQUIREMENTS = 3
   const COLLABORATION = 4
   const DASHBOARD = 5
   const COMPONENTS = 6
   const RELEASES = 7

     If ProjectName=("Test_Prj_1") then
      If User.IsInGroup("Test_Prj_1_Mgr") then

      CustModules.Visible(DEFECTS) = TRUE
      CustModules.Visible(TESTPLAN) = False
      CustModules.Visible(TESTLAB) = True
      CustModules.Visible(REQUIREMENTS) = TRUE
      CustModules.Visible(COLLABORATION) = FALSE
      CustModules.Visible(DASHBOARD) = True
      CustModules.Visible(COMPONENTS) = TRUE
      CustModules.Visible(RELEASES) = TRUE
      End If
   End If

Cust.Commit
Set custModules = Nothing
Set Cust = Nothing
'>>> End of Hide individual modules script <<<<

I have placed this code in the template project under the Template_CanLogin function.  This cuts the module access on and off but only for TDADMIN.  I cannot find a way to turn on/off this module access by selective group.  Any help would be appreciated.

0 Likes
1 Solution

Accepted Solutions
machinedata Super Contributor.
Super Contributor.

Re: ALM version 12.55 Template Module Access

Jump to solution

What about using the IsVIsibleForGroup method instead? 

Read-write property

 

Public Property IsVisibleForGroup( _
   ByVal ModuleID As Long, _
   ByVal Group As Variant _
) As Boolean 
0 Likes
6 Replies
machinedata Super Contributor.
Super Contributor.

Re: ALM version 12.55 Template Module Access

Jump to solution

What about using the IsVIsibleForGroup method instead? 

Read-write property

 

Public Property IsVisibleForGroup( _
   ByVal ModuleID As Long, _
   ByVal Group As Variant _
) As Boolean 
0 Likes
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: ALM version 12.55 Template Module Access

Jump to solution

Did you check Module Access in Customize in the projects where you have problems? This can be defined per project even if the groups are defined in the template project.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Danny Philips Trusted Contributor.
Trusted Contributor.

Re: ALM version 12.55 Template Module Access

Jump to solution

I will have to look into that option.

0 Likes
Danny Philips Trusted Contributor.
Trusted Contributor.

Re: ALM version 12.55 Template Module Access

Jump to solution

I did check the module access but it seems that my projects controled from the templete does not allow for changes, greyed out.  Is there something I did to turn the module access off in the linked projects?  This would easily resolve my issue. 

0 Likes
Highlighted
Acclaimed Contributor.. Jan Czajkowski Acclaimed Contributor..
Acclaimed Contributor..

Re: ALM version 12.55 Template Module Access

Jump to solution

Sorry, my mistake. The project I checked was temporarily disconnected from the template.

I guess you were on the right track with the CustomizationModules object. Only the property takes a bitmask representing all the groups in the project and not a Boolean value.

"Set bits represent groups for which the module is visible. For example, if bit 0 is set, then the module is visible for members of the group where CustomizationUsersGroup.ID = 0."

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
0 Likes
Danny Philips Trusted Contributor.
Trusted Contributor.

Re: ALM version 12.55 Template Module Access

Jump to solution

Finially got a chance to explore further into this suggestion.  The "isvisibleforgroup" suggestion worked. 

Dim Cust 'As Customization

   Dim CustModules 'As CustomizationModules

   Set Cust = TDConnection.Customization

   Cust.Load

   Set CustModules = Cust.Modules

Dim Project

Project = ProjectName

 

Select case project

   case "Test_Prj_2"

       custmodules.isvisibleforgroup(1,11)=False ',11 - Tst_Prj_1_Mgr

       custmodules.isvisibleforgroup(2,11)=False

       custmodules.isvisibleforgroup(11,11)=False

 

   case "Test_Prj_1"

       custmodules.isvisibleforgroup(1,12)=False ',12 - Tst_Prj_2_Mgr

       custmodules.isvisibleforgroup(2,12)=False

       custmodules.isvisibleforgroup(11,12)=False

   End Select

 

   Cust.Commit

   Set custModules = Nothing

   Set Cust = Nothing

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.