Zum Ende der Metadaten springen
Zum Anfang der Metadaten

Sie zeigen eine alte Version dieser Seite an. Zeigen Sie die aktuelle Version an.

Unterschiede anzeigen Seitenhistorie anzeigen

« Vorherige Version anzeigen Version 10 Nächste Version anzeigen »

In this section we want to introduce Admin Roles to provide our different backend users with role-based permissions.

We have three different user roles:

  • Super admin users,

  • employees and

  • representatives of partnering shipping companies.

Define admin roles

cmsbs-conf/conf.d/admin_role.attributes:

admin_role.values[] = ""
admin_role.values[] = "employee"
admin_role.values[] = "shipping_company"

Employees

Employees should be able to:

  • View, edit and create Entries (shipping companies, employees and customers),

  • view, edit and create Lists (aka Channels),

  • view existing Segments (aka VChannels) and

  • send Newsletters.

cmsbs-conf/adminRoles/role_employee.properties:

gui.areas = ShowUser EditUser ListUsers CreateUser ListChannels EditChannels ListVChannels NewsletterArchive SendNewsletter NewsletterQueue
attr.entrytype.values = shipping_company employee customer
area.CreateUser.employee = false
area.EditChannels.EditTags = false
area.SendNewsletter.EditTags = false

Representatives of shipping companies

Representatives or partnering shipping companies should be able to:

  • View, edit and create Entries (trucks and customers),

  • view existing Lists and Segments (aka Channels and VChannels) and

  • send Newsletters.

cmsbs-conf/adminRoles/role_shipping_company.properties:

gui.areas = ShowUser EditUser ListUsers CreateUser ListChannels ListVChannels NewsletterArchive SendNewsletter NewsletterQueue
attr.entrytype.values = truck customer
area.SendNewsletter.EditTags = false

Symlink Admin Roles

 UM < 7.46

So far, we have logged-in against the “user database” defined in a config file:

env/devel/cmsbs-conf/conf.d/devel.login.properties:

cmsbs.gui.login = "config"
cmsbs.gui.user.1 = "admin:admin:Admin-User:de:"

Now, we want to switch over to the internal login mode to be able to interactively create and use new backend users. We’ll change the value of cmsbs.gui.login from config to internal.

And again we have to comment in the other line in our build.gradle:

    fileTree('cmsbs-conf/entryTypes').each {target ->
        ln(target, new File(pinuts.um.cmsbsConfDir, 'entryTypes'))
    }
    fileTree('cmsbs-conf/adminRoles').each {target ->
        ln(target, new File(pinuts.um.cmsbsConfDir, 'adminRoles'))
    }

Create Admin Entry

Next, we’ll have to create at least one initial admin user to be able to login again:

(cd UM/scripts && ./userTool.sh cmsbs.properties -admin)

Now, we can start our UM and login as admin / admin (if you chose the default username and password).

We can now create new user entries and assign our newly implemented admin roles.

  • Keine Stichwörter