EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08860


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] How to allow edit specific metadata for certain user?


Hi Izwan,

If you just want to limit this field to be editable in the workflow to editors and admins you can put the field in an if statement like the following into EPRINTS_PATH/archives/ARCHIVE_NAME/cfg/workflows/eprint/default.xml:

<epc:if test="$STAFF_ONLY = 'TRUE'" >
  <field ref="item_status" />
</epc:if>

If you need some more complex restriction you may need to do something like:

<epc:if test="$current_user{usertype} = 'admin' or $current_user{usertype} = 'local_admin' or $current_user{usertype} = 'editor'">

<epc:if test="$current_user{username} = 'joe.bloggs'">

Where the part in {} is the name of the field within the user record you want to match.  I am not sure if you can do partial matches of a string without taking a closer look of the available comparator operators you have available in EPC.

Regards

David Newman

On 03/02/2022 11:54, MOHD.IZWAN SALIM via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Dear all

I create a specific metadata - Item Status : Processing | Binding | Shelve

I would like o specific this metadata editing for only certain users.

Can I achieve that with the Roles function?

Regards

PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...


DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/