Thank you for your replies.
That's what I was thinking to make changes to the user authorities without the need of closing the application, but I found something else which also is useful at least in my situation.
I've disabled the main menu options that are shown in the main form (form1) by default using the code I've found posted in another article:
Form1.mniFile.Visible := False;
Form1.mniOptions.Visible := False;
Form1.mniAbout.Visible := False;
Form1.mniReport.Visible := False;
and create a checkbox item that is visible only to the administrator and whenever it is checked it changes the menu visibility to true and show all the options again and modify whatever I want to and by unchecking it, it returns to the custom menu that I created. This is the code that I used maybe someone else will need it:
procedure Form1_CheckBox1_OnClick (Sender: TObject);
begin
If Form1.CheckBox1.Checked Then
begin
Form1.mniFile.Visible := True;
Form1.mniOptions.Visible := True;
Form1.mniAbout.Visible := True;
Form1.mniReport.Visible := True;
end
Else
begin
Form1.mniFile.Visible := False;
Form1.mniOptions.Visible := False;
Form1.mniAbout.Visible := False;
Form1.mniReport.Visible := False;
end
end;
I was wondering if you can create dynamic submenu items. I found some codes from another sites but they don't work for some reason. Anyway I attach photo of how do I imagine the menu.
Thank all of you for your help once again.