If user hasn't permission for any Service Method, error msg is ok, is about permission. ("Required permissions were not met...") But for Controller method (returns PartialView) error msg is "an internal error occured..". Not about permission.
I want Controller to show error msg about permission as Service. what can I do?
7 Answer(s)
-
0
You can add this attribute to your methods: [WrapResult(WrapOnSuccess = false, WrapOnError = true)]
-
0
Nothing changed. I still get that general message. "an internal error occured during your request"
-
0
Can you check the error log in *.Web.Mvc\App_Data\Logs?
-
0
It is ok : "Abp.Authorization.AbpAuthorizationException: Required permissions are not granted. At least one of these permissions must be granted: *** "
But message shown on alert is like "an internal error occured during your request"
-
0
Hi @mamak,
How do you call your controller action ? Via an ajax request ?
-
0
Controller: HastaTakip, Action: MuayeneModal
var _muayeneModal = new app.ModalManager({ modalId: "modalMuayene", viewUrl: abp.appPath + 'Mpa/HastaTakip/MuayeneModal',
modalClass: 'MuayeneModal', modalData: hastaId }); _muayeneModal.open(); -
0
Hi @mamak,
I have checked and ABP does not wrap response for partialview results. So, you need to hide the item which opens modal if user does not have required permisison.