Workflow problem: Upload and later Authorized

Phoca Download - download manager
CAP
Phoca Member
Phoca Member
Posts: 12
Joined: 28 Mar 2014, 12:50

Workflow problem: Upload and later Authorized

Post by CAP »

Hello friends.

I'm a first time user of Phoca Download and I have to say thank you very much for this great piece of software. And especially thank you for delivering it free. For a small budget Agricultural Association as us its a blessing.

Now for the issue.
I'd like to say that it might be a mistake being made by me but I've read everyhting I could find and this seems to be a normal feature of the siftware but I cannot seem to make it work.

Here's my situation: All my users will have backend access. I have 2 users that were made part of a group (adm) based on manager but more limited since they should not be able to publish content. And I have 1 user that is coordinator and will only review the content and make it public (publish/authorize).

SETUP:
Image
Image

I believe I've set up everyting fine but my "limited" users still start a new upload as a published + authorized file making it immediatly public.
The file starts as Published and Authorized and this way the users do not need to change it and the files are made available immediatly instead of being reviewed and aproved.
Image

Thanks in advance.
Best regards,
Manuel Borges

P.S. Forgive my poor English as I'm not native speaker.
CAP
Phoca Member
Phoca Member
Posts: 12
Joined: 28 Mar 2014, 12:50

Re: Workflow problem: Upload and later Authorized

Post by CAP »

Hello again.

I have build a pt-PT language package for PhocaDownloads. If the developers of Phoca Download are interested I can share it.
Anyone else interested is algo welcome to ask.

Changing the subject: any ideas on the above?

Best regards,
Manuel Borges
CAP
Phoca Member
Phoca Member
Posts: 12
Joined: 28 Mar 2014, 12:50

[SEMI-SOLVED] Re: Workflow problem: Upload and later Authori

Post by CAP »

OK... so I managed to make this work.

Here's my aproach:
1) I thought that maybe chnaging the default value for files (Not Authorized) would be enought and so I changed the file: /administrator/components/com_phocadownload/models/forms/phocadownloadfile.xml in line 109 to default 0

Then tried to create a new file and it actually had the option as default "Not Authorized" but the user could change it to "Authorized" even when the permissions say its not suposed to, the only thing they could not do is change it in the list or after being saved for the first time.

So I changed the code a bit to make my wishes.
The file /administrator/components/com_phocadownload/views/phocadownloadfile/tmpl/edit.php line 49 i changed this:

Code: Select all

'<div class="tab-pane" id="publishing">'."\n"; 
foreach($this->form->getFieldset('publish') as $field) {
	echo '<div class="control-group">';
	if (!$field->hidden) {
		echo '<div class="control-label">'.$field->label.'</div>';
	}
	echo '<div class="controls">';
	echo $field->input;
	echo '</div></div>';
}
echo '</div>';
To this:

Code: Select all

echo '<div class="tab-pane" id="publishing">'."\n";
$id_publicacao=0; 
foreach($this->form->getFieldset('publish') as $field) {
	$id_publicacao++; 
	if ($id_publicacao!=2){
		echo '<div class="control-group" id="'.$id_publicacao.'">';
		if (!$field->hidden) {
			echo '<div class="control-label">'.$field->label.'</div>';
		}
		echo '<div class="controls">';
		echo $field->input;
		echo '</div></div>';
	} else {
		echo '<div class="control-group" id="'.$id_publicacao.'" style="display:none;">';
		if (!$field->hidden) {
			echo '<div class="control-label">'.$field->label.'</div>';
		}
		echo '<div class="controls">';
		echo $field->input;
		echo '</div></div>';
	}
}
echo '</div>';
yes I know the ids and the showing of it hidden from view are doing nothing here but they're there to help me test it.

Now that field does not show to anyone, even though its rendered in the code and the admins can "Authorize" the files from the list if everything is OK.

Could something like this be implemented on a future release but instead of reading that variable read the permission a user have to change the status and not even create the field for view?

Thanks in advance.

Best regards,
Manuel Borges
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Workflow problem: Upload and later Authorized

Post by Jan »

Hi, yes, for now there is no feature to differentiate between users in backend - all users who can access backend can authorize files. I have added it to feature request list.

Yes, will be great to get a language copy.

Thank you, Jan
If you find Phoca extensions useful, please support the project
CAP
Phoca Member
Phoca Member
Posts: 12
Joined: 28 Mar 2014, 12:50

Re: Workflow problem: Upload and later Authorized

Post by CAP »

Hello.

Great.
Thanks for the reply and look forward to this feature. :-)

Here's the translation file for Phoca Download versions 2.x & 3.x and Joomla 2.5 & 3.x.

Code: Select all

<files folder="backend" target="administrator/language/pt-PT">
		<filename>pt-PT.com_phocadownload.ini</filename>
		<filename>pt-PT.com_phocadownload.sys.ini</filename>
		<filename>pt-PT.plg_content_phocadownload.ini</filename>
		<filename>pt-PT.plg_content_phocadownload.sys.ini</filename>
		<filename>pt-PT.plg_editors-xtd_phocadownload.ini</filename>
		<filename>pt-PT.plg_editors-xtd_phocadownload.sys.ini</filename>
		<filename>pt-PT.plg_search_phocadownload.ini</filename>
		<filename>pt-PT.plg_search_phocadownload.sys.ini</filename>
	</files>
	<files folder="frontend" target="language/pt-PT">
		<filename>pt-PT.com_phocadownload.ini</filename>
		<filename>pt-PT.com_phocadownload.sys.ini</filename>
		<filename>pt-PT.mod_phocadownload_chart_statistics.ini</filename>
		<filename>pt-PT.mod_phocadownload_chart_statistics.sys.ini</filename>
		<filename>pt-PT.mod_phocadownload_tree.ini</filename>
		<filename>pt-PT.mod_phocadownload_tree.sys.ini</filename>
	</files>
Hope this helps.

Best regards,
Manuel Borges
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Workflow problem: Upload and later Authorized

Post by Jan »

Hi, thank you very much.

Jan
If you find Phoca extensions useful, please support the project
Post Reply