Permisions for add new applicaion

2 years 9 months ago #259
Topic Author
dennisbuijs's Avatar
Posts: 24
Permisions for add new applicaion

Hi

I made a few changed in the code. I have 2 completed competitions, so the database start_date is set to '0000-00-00 00:00:00'.

In function isCompetitionStarted in administrator\components\com_competition\helpers\extension.php, the competition is active, see line 685, i have changed it to false.

Second, i want that nobody can upload new application when the competion is not yet active.
I added the following code at line 466:
if (!$competitionStarted)
{
continue;
}

Best regards
Dennis

2 years 9 months ago #260
Dmitry's Avatar
Posts: 536
Re: Permisions for add new applicaion

Hello!

I have 2 completed competitions, so the database start_date is set to '0000-00-00 00:00:00'.

In function isCompetitionStarted in administrator\components\com_competition\helpers\extension.php, the competition is active, see line 685, i have changed it to false.

Well the code of this method is correct - the purpose is to check for start, not for status (active/completed). What is the case to make this change?

Second, i want that nobody can upload new application when the competition is not yet active.

Do you mean the period between created date and start date?

Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!

2 years 9 months ago #261
Topic Author
dennisbuijs's Avatar
Posts: 24
Re: Permisions for add new applicaion

Hi Dmitry


Question:
Well the code of this method is correct - the purpose is to check for start, not for status (active/completed). What is the case to make this change?

Answer:
When the competition is not yet started, i want that it is not possible to upload a new application, only when the competition is started. I mean indead no uploads between the competition created date and the competitions start date.

Best regards
Dennis

2 years 9 months ago #262
Dmitry's Avatar
Posts: 536
Re: Permisions for add new applicaion

Now it is clear :)

I think that the best option here would be not explicitly restrict this, but to add a new permission like Create Before Competition Start. It is not so hard to add and I can do it for 1.4.0.

Dmitry


Like our extensions and support?
Add your voice to the JED listing with a 100-score review: bit.ly/2ciJBqC
Thanks!

You can get our help: Monday - Friday / 09:00 to 17:00 (GMT+2). but not limited. Our staff will be pleased to provide Premium support to every paid subscriber asap, but sometimes you should be ready to wait for our reply for up to 3 days. In case of free extensions we do the best to develop and maintain them either, but their support is not necessary.

Product Latest Update