I have been doing the similar thing. I think i might help here a bit.
You can check the detailed instructions here
Following are the steps you need to take to achieve what you have mentioned in your questions
- only admin should be able to create the etherpad.
You need to change the editOnly
and requireSession
property to true in settings.json file.
- the etherpad should be active only for x minutes
For this, first you need to create a group using createGroup
function. This function will give you groupID that you can use to create group pad using createGroupPad
function.
Once you have created the group pad, you need to create a session to allow access to that pad. You can create session using createSession
function which requires three arguments: authorID, groupID and validUntil. In validUntil you can specify the unix timestamp in seconds till when you want to allow access to the pad.
3.after x minutes the same etherpad should become read-only.
You can store the pad creation time in your db. When someone access the pad after the 40 minutes, you can provide access to the pad with read only pad id. You can use readOnly
function.