The OneStream Community is temporarily frozen until June 29th due to the ongoing maintenance. Please read the blog post here to learn more.

Forum Discussion

BSK's avatar
BSK
New Contributor III
3 years ago
Solved

Restriction of posting "Unbalanced" journals when creating the journals manually

Hi, Is there any option to restrict some of the users to post unbalanced journals ? we are able to restrict it in the journal templates. But we also want to restrict when user try to create by clic...
  • JackLacava's avatar
    3 years ago

    In your handler, you can just look up your user groups and react accordingly.

    This should work pretty much anywhere...

    Dim objUserInfo As UserInfo = BRApi.Security.Authorization.GetUser(si, si.UserName)
    If objUserInfo.ParentGroups.ContainsValue(BRApi.Security.Admin.GetGroup(si, groupName).Group) Then
    	....
    

    whereas this is specific to journal extenders:

    Using dbConnFW As DbConnInfo = BRApi.Database.CreateFrameworkDbConnInfo(si)
    	Dim objUserInfo As UserInfo = EngineUsers.GetUser(dbConnFW, yourJournalObject.Header.Header.CreatedUserID)
    	If objUserInfo.ParentGroups.ContainsValue(BRApi.Security.Admin.GetGroup(si, groupName).Group) Then