Get Error Message Like "action Unauthorized" In Dialog When Used


I use CJuiDialog box in order to edit/update/create any entry. For each of these actions I put different access rules which are checked every time a user try to do them. However, my problem is when a user don’t have access to an action, the dialog opens and stay blank… so the user cannot know why the dialog stays blank. Instead I would like to open dialog (like it does actually) but display the default message “error 403 you are not authorized to perform this action”.

I tried to put this message in grid in order to be able to see it in dialog but i doesn’t work, or maybe I didn’t succeed.

Do you have any idea ?


I generally don’t output links or buttons that the user doesn’t have permission to use. Is this an option in your application?

Yep I thought about this solution too, however I don’t really know how could I apply it. I use a widget to display my button which are linked with action… How could I check permission on it ?

Any solution to this problem?

I have tried using ajax error object but unfortunately no success.

I finally only display action button matching with the user’s access rules.