Buy Now
Sign in

Check access control in CC6 for external form CF6

Folk86 , July 08 2019, 12:21
F
Folk86 10
July 08 2019, 12:21 #388039
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 7
July 08 2019, 13:04 #388041
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.
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
F
Folk86 10
July 08 2019, 13:26 #388042
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.
admin 27
July 10 2019, 06:23 #388087
 1
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
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
healyhatman 7
July 10 2019, 06:24 #388088
That's pretty cool, I've wanted the ability to have an event run if the user doesn't have the right permissions
Web developer at SkySpider.com.au - I DO NOT work for ChronoEngine!
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
admin 27
July 10 2019, 06:47 #388089
yes, it helps in the situations when you need to need to have action events.
Best regards
Max
If your main question got answered then please mark the answer using the button!
Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
F
Folk86 10
July 10 2019, 09:17 #388093
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