Forums

Check access control in CC6 for external form CF6

folk86 08 Jul, 2019
Good morning,

I'm sorry for my English, I try to explain my problem as best I can.

I have a CC6 frontend page with one table (see image) that show me records.


Now, I want only the users with Author or Superuser permissions can edit the records, the Registered users can only see the details.
The first column have a link that call the edit event of the CC (image above). The edit event having the "code" and permission that you can see in the next 2 images.






The CF's form called by CC have the permission in the image below



When I call the form directly via url (Joomla's menu) I receive the message below (for me is correct) "Error: Unauthorized access"


but when I'm clicking the CC "edit link" I'm receiving the page below (empty page).


CASE
A) The CC don't render anything because the permission on "edit" is blocked by the rule (debug is not displayed too).
B) After that I try to remove the rules on CC event, because on my idea the CF rules must block the render end display the message (but nothing, the form is show).

FINALLY
I ask you if is possibile in the case:
A) Show a message of "ERROR: access denied" when an event don't have the permission. (If is possibile, how?)
B) There's a option or setup I forgot.


Thank's for your time and suggestions.

Simone
healyhatman 08 Jul, 2019
Put a debug in the form too, probably not returning anything correctly?

Also your {debug:} in CC should go AFTER all of your {fn:} statements, so you can see the data returned by them.
folk86 08 Jul, 2019
Hy healyhatman,

nothing. I put the debugger on the "load" form action of CF but the page returned is the same "blank". I think the permission check of the event is the first piece of code executed.
Is the same thing for the debug in CC.
Max_admin 10 Jul, 2019
1 Likes
Hi,

If you have few days for this project then please wait the next CF update, it has a new "Connectivity" mode, you can build your connection in Chronoforms itself and so you do not need to mix both just to have the form.

In the latest CF an event named "403" will be called if an event with wrong permissions is called, so just add a new page named 403 and then add your own message.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 10 Jul, 2019
That's pretty cool, I've wanted the ability to have an event run if the user doesn't have the right permissions
Max_admin 10 Jul, 2019
yes, it helps in the situations when you need to need to have action events.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
folk86 10 Jul, 2019
Hi Max,

In the latest CF an event named "403" will be called if an event with wrong permissions is called, so just add a new page named 403 and then add your own message.


The solution above is "the TOP" and I can wait.
Now I'm using a "trick". If users don't have the permission I'm changing the link on the table and they "are going to" the "denied" event.

Thank's for the support.

Simone
This topic is locked and no more replies can be posted.