[SOLVED] [CB Auto Action] Execute Super Admin Action by CRON

3 years 9 months ago - 3 years 9 months ago #319477 by Julien04
Hello,

My wish is to execute an action configured with execution rights for the Super Admin.

Little experienced in php, I looked for help on forums and it seems that the fact that the action configured for a Super Admin turns out to be a problem to execute it by a CRON task.

Could you confirm me if it is possible to execute a CB action (Super Admin Rights Execution) with a CRON task?

Thanks by advance

Please Log in to join the conversation.

3 years 9 months ago #319493 by beat
Not sure what you mean. Or maybe the short answer is just "yes"-

The long answer is:

The actions of CB Auto-actions are executing without specific user rights, but as any Joomla code, so with same rights as a super-admin.

If you create a CB Auto-Action without any trigger specified, the URL displayed in the first tab will allow you to use it with a cron job.

IMPORTANT: If your action is security-critical and someone guessing the URL should not be executing it, then you should also add a condition to the auto-action, e.g.
Field: Value
Custom value: [get_mysecrettoken]
Operator: Equal to
Value: 1231231231231231231231231231231231232312312312323123123213214
(of course put your own long and hard to guess secret token here)

then to the url shown for the cron task, add:

&mysecrettoken=1231231231231231231231231231231231232312312312323123123213214
(of course put your own long and hard to guess secret token here)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info
The following user(s) said Thank You: Julien04

Please Log in to join the conversation.

3 years 9 months ago #319508 by Julien04
It was totally what I meant :).

I tested it and it works perfectly.

Thanks for sharing !!!

Have a nice day !

Julien

Please Log in to join the conversation.

3 years 9 months ago #319514 by beat
Great! Thanks for feedback, marked as solved. :)

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.184 seconds

Facebook Twitter LinkedIn