Forum Discussion

OSAdmin's avatar
OSAdmin
Valued Contributor
5 years ago

How do I create a mass/parent security group that locks users from changing data but allows them to read the data?

Originally posted by Christina Otello

12/6/2017

How do I create a mass/parent security group that locks users from changing data but allows them to read the data?

We have a process in which Rig users enter CC data (day 1-10), then the tax dept inputs allocations on top of the CC's (day 11-13). We would like the admin to lock out the Rig users on Day 11-13.

Currently we have security on the CC (read and read/write groups) and security on the workflow. I'm not sure if I can create a ReadOnly group for all the Rig Users that will over ride their individual access.

Or is there another easy button approach to give Rig Users only read rights? 

  • OSAdmin's avatar
    OSAdmin
    Valued Contributor
    Originally posted by Eric Osmanski

    Finally getting back to this..Eric Osmanski. How does this look? Basically I want the admin to open a form to select account DataLock as either Lock/Unlock. If the account is Lock and user in WF_Allocation_Access then they can input data. If not NoInput.

    Dim curCC As String = api.Pov.UD1.Name
    Dim curTime As String = api.Pov.Time.Name
    Dim curScenario As String = api.Pov.Scenario.Name
    Dim curCube As String = api.Pov.Cube.Name

    Dim reviewLevel As String
    Dim securityGroup As Boolen
    Dim wfGroup As Boolen
    Dim LockStatus As String

    'Should be in the similar POV as trigger
    'Process DataLock set to Lock to trigger rule
    'Allow access to wfGroup WF_Allocation_Access all other groups set to NoInput

    Dim DataLock As DataCell = api.Data.GetDataCell(""Cb#DODI_RigPlan:E#GlobalCC:C#Local:V#Periodic:A#DataLock:F#Input_USD:O#Forms:I#None:U1#None:U2#NoLocation:U3#NoRigStatus:U4#None:U5#NoLaborCat:U6#None:U7#None:U8#Stat_Input"")
    securitGroup = BRApi.Security.Authorization.IsUserInGroup(si, ""WF_ReviewLevel"" & reviewLevel)
    wfGroup = BRApi.Security.Authorization.IsUserInGroup(si, ""WF_Allocation_Access"")

    If wfGroup = True
    If securitGroup = True
    If LockStatus = ""Lock"" Then
    Return ConditionalInputResultType.Default
    Else
    Return ConditionalInputResultType.NoInput
    End if
    End if
    End if
    in your current rule you are never setting LockStatus
    Looks pretty good, but I assume they are going to enter a 1 or 0 (your GetDataCell is going to return a numeric value). So then you have to change ""If LockStatus = ""Lock"" to ""If DataLock.CellAmount = ""1"""" or 0....