Forum Discussion

mvalerio24's avatar
mvalerio24
New Contributor III
2 years ago

Application Security Role update with Business Rules

Is it possible to update the Application Security roles with in an extender Business rule? I want to be able to update the Modifydata role with the push of a button.
  • photon's avatar
    2 years ago

    I've been able to update security groups without an IIS reset using a BR, here are the relevant pieces:

    Dim objMember As WritableMember = BRApi.Finance.Members.ReadWritableMemberNoCache(si, DimType.Entity.Id, memberName)
    
    objMember.ReadDataGroupUniqueID = BRApi.Security.Admin.GetGroup(si,groupName).Group.UniqueID
    
    BRApi.Finance.MemberAdmin.SaveMemberInfo(si, True, objMember, False, properties, False , descriptions, TriStateBool.FalseValue)

     We've had this running on a nightly schedule to keep our descriptions up to date with MDM but it could be hooked to a button press just the same. I don't know how it compares to Jack's method and his certainly looks simpler but maybe it will be of some use.