Tutorial about the Fe-Editing

To enable the fe-editing make sure you have the according views selected in the flexform and add:

plugin.tx_cal_controller.rights.edit = 1

to your typoscript setup.

This doesn't change a thing in the output at this point, but consider it as a main switch to turn it on and off again, when you have more things configured.

There are mainly 3 different types we should distinguish between:
Editing as

- admin

- fe-user

- public user

Admin Fe-Editing

Enabling fe-editing for an admin means, that this user has full access to all records!

Set:

plugin.tx_cal_controller.rights.admin.user = insertUserIdHere

or for a group:

plugin.tx_cal_controller.rights.admin.group = insertGroupIdHere

Now an according logged-in user should see create / edit and delete icons.

User Fe-Editing

The fe-user fe-editing needs a detailed configuration.

First you have to enable each operation seperatly:

plugin.tx_cal_controller.rights.create.event.XXX

The XXX stands for user, group and public. Each operation and each field can be configured differently for a fe-user, a fe-group or every user (public).

Let's consider we have a public calendar (uid=5) with someone allowed to administrate it. This someone is a fe-user with the uid=2, who should be allowed to create events (fields: title,category,startdate,starttime,enddate,endtime,description,location) and he should be able to edit his events.

The typoscript should look this way:

plugin.tx_cal_controller.rights {
  edit = 1
  create.event {
    user = 2
    fields {
      title.user = 2
      category.user = 2
      calendar_id.public = 0
      # make sure the event gets linked to our public calendar
      calendar_id.default = 5
      startdate.user = 2
      starttime.user = 2
      enddate.user = 2
      endtime.user = 2
      allday.public = 0
      description.user = 2
      location.user = 2
      cal_organizer.public = 0
      organizer.public = 0
      cal_location.public = 0
    }
    # adding fe-user to shared field, to enable him to edit the event
    addFeUserToShared = 1
  }
  # the same as create
  edit.event {
    user = 2
    fields {
      title.user = 2
      category.user = 2
      calendar_id.public = 0
      # make sure the event gets linked to our public calendar
      calendar_id.default = 5
      startdate.user = 2
      starttime.user = 2
      enddate.user = 2
      endtime.user = 2
      allday.public = 0
      description.user = 2
      location.user = 2
      cal_organizer.public = 0
      organizer.public = 0
      cal_location.public = 0
    }
    # adding fe-user to shared field, to enable him to edit the event AGAIN!
    addFeUserToShared = 1
  }
}

Public Fe-Editing

The public fe-editing is similar to the fe-user fe-editing. Everything we defined as "user" is now "public", with one difference: we only use 0 and 1 (disable / enable).

So a typoscript for a public user allowed to create an event (fields: title,category,startdate,starttime,enddate,endtime,description,location) would look like this:

plugin.tx_cal_controller.rights {
  edit = 1
  create.event {
    public = 1
    fields {
      # most of the fields are already configured for public access. we only have to make sure it's not more than we want
      calendar_id.public = 0
      # make sure the event gets linked to our public calendar
      calendar_id.default = 5
      allday.public = 0
      cal_organizer.public = 0
      organizer.public = 0
      cal_location.public = 0
    }
  }
}

Notice, that you can also enable the editing of an event for a public user. But this would mean, that ANY user is allowed to edit!!!

Also available in: HTML TXT