Enabling/Disabling roles

I’ve created two languages roles [EN] and [LT]. In the page I’ve put two buttons which one enables English role for Default user (disables LT role), other one - LT role . whats wrong with my code? here it is for enabling English role: Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Dim acl As NotesACL

Dim entry As NotesACLEntry	

Set db = session.CurrentDatabase

Set acl = db.ACL

Set entry = acl.GetEntry( "-Default-" )

Call entry.DisableRole( "LT" )

Call entry.EnableRole( "EN" )

Call acl.Save

End Sub

Please hel me,

Thanks for answering :slight_smile:

Subject: Works fine in an agent

I didn’t have any problem running this as an agent from the actions menu. I was running it in a local db for which I am a manager.