Add Menu Issues for another role?

How to add menu issues for another role in ojs 3.01?

Hi @Vhiie,

The “Issues” menu is only available to Journal Managers. I suspect your user doesn’t have that role.

Regards,
Alec Smecher
Public Knowledge Project Team

thx your answer

but, i just want add this menu to role Production.
just menu Issues :slight_smile:
so, Journal manager and production can publish or create issues

Hi @Vhiie,

You’ll have to do quite a bit of coding to grant the Issues menu to other users – but in order to add the menu, start with templates/common/header.tpl.

Regards,
Alec Smecher
Public Knowledge Project Team

i add this code in Templates/common/header.tpl

{if array_intersect(array(ROLE_ID_ASSISTANT), (array)$userRoles)}
	<li aria-haspopup="true" aria-expanded="false">
		<a name="issues" href="{url router=$smarty.const.ROUTE_PAGE page="manageIssues"}">{translate key="editor.navigation.issues"}</a>
		<ul>
			<li><a href="{url router=$smarty.const.ROUTE_PAGE page="manageIssues" anchor="futureIssues"}">{translate key="editor.issues.futureIssues"}</a></li>
			<li><a href="{url router=$smarty.const.ROUTE_PAGE page="manageIssues" anchor="backIssues"}">{translate key="editor.issues.backIssues"}</a></li>
		</ul>
	</li>
{/if}

*i think production is "ROLE_ID_ASSISTANT"

and this work,
thx u :smile:
what am i doing after this?

Hi @Vhiie,

You’ll have to work through pages/manageIssues/ManageIssuesHandler.inc.php to add the assistant role to the permitted list, then through the various grid handlers etc. (see controllers/grid/issues/) to do the same.

Regards,
Alec Smecher
Public Knowledge Project Team

what next sir ?
i add role in there…
thx before

Hi @Vhiie,

I’m afraid I can’t walk you through this in detail. Basically, you need to permit ROLE_ID_ASSISTANT users to access the various handlers and controllers, which currently exclude that role.

Regards,
Alec Smecher
Public Knowledge Project Team

its done,
but still problem,

i add this code in classes/controllers/grid/issues/IssueGridHandler.inc.php

$this->addRoleAssignment(
		array(ROLE_ID_ASSISTANT),
		array(
			'fetchGrid', 'fetchRow',
			'addIssue', 'editIssue', 'editIssueData', 'updateIssue',
			'uploadFile', 'deleteCoverImage',
			'issueToc',
			'issueGalleys',
			'deleteIssue', 'publishIssue', 'unpublishIssue',
			'identifiers', 'updateIdentifiers', 'clearPubId', 'clearIssueObjectsPubIds',
		)
	);

i can create issues.
but, i cant publish, delete, edit issues :frowning:

Hi @Vhiie,

I would suggest using a developer tool like Firebug for Firefox to have a look at the request URL that’s resulting in failure. You can use that to identify the controller or handler that needs the authorization policy changed to include assistant roles.

Regards,
Alec Smecher
Public Knowledge Project Team

now , i can publish issues, delete, unpublish.
but , cant edit :frowning:

Hi @Vhiie,

I’m afraid it’ll be difficult to assist without knowing what you’ve changed. If you’re willing, the best way to describe your changes is to post them on a github fork of the ojs and pkp-lib repositories.

Regards,
Alec Smecher
Public Knowledge Project Team