Review main Abandoned

56557[WIP][FEATURE] Provide VH to check whether the backend user is an administrator

Josef Glatz CR 0 V 0 Normal +165 −0 updated 11/16/18, 10:12

Commit message

Provide a ifAdmin/else condition ViewHelper to check whether the
backend user is an administrator.

Useful e.g. in backend preview fluid templates (page module) when
you want to show extended information only to administrators.

A unit test is added to test such a sensitive security related condition.

Usage examples:

<f:be.security.ifIsAdmin>
    Only visible to a backend admin user
</f:be.security.ifIsAdmin>

<f:be.security.ifIsAdmin>
  <f:then>Only visible to a backend admin user</f:then>
  <f:else>Only visible to a non backend admin user</f:else>
</f:be.security.ifIsAdmin>

{f:be.security.ifIsAdmin(then: 'Only visible to a backend admin user')}
{f:be.security.ifIsAdmin(else: 'Only visible to a non backend admin user')}
{f:be.security.ifIsAdmin(then: 'admin only', else: 'show a text to non admin users')}

Review

  • Code review CR 0

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V 0

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 3