create an etherpad for x minutes and after x minutes the same etherpad should be in readonly mode - etherpad

I am new to etherpad and it's very interesting. i need an etherpad to be created with API only
only admin should be able to create the etherpad.
the etherpad should be active only for x minutes (like 40min).
after x minutes the same etherpad should become read-only.
Can anyone help me out

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.

Related

How to inactivate Users in maximo who don't use it anymore?

I am very new to maximo.
I wanted to know how to inactivate users who are not using maximo anymore. I tried googling this but I am not able to find enough material on Maximo.
I have to write a cron task to do that.
I saw this: http://www.ibm.com/support/knowledgecenter/SSZRHJ/com.ibm.mbs.doc/autoscript/t_cron_task_scripts.html
Can anyone give e a few pointers on how to write it, maybe a sample cron task?
What you're looking for is an Escalation. Escalations are instances of a special Cron Task that has been designed to use a query (a target object and a where clause) to find records and then to apply actions to and / or send emails from each record found.
You'll need to define the where clause against MAXUSER to locate the records you want to deactivate and find or define an Action to change the status of the records found. You can then hook the query and the action together via an Escalation.
The query below is for Oracle database. It looks at the logintracking table and gives you a list of users whose last interaction with Maximo is over 90 days ago:
select * from
(select max(attemptdate) lastLogout, loginid
from logintracking
where loginid <> 'MAXADMIN'
group by loginid
order by max(attemptdate) desc
)
where lastlogout < sysdate - 90
If this is a one-time change, you can manually inactivate the users using Security > Users. If you want to run this weekly, you'd have to change the query a bit to updates the status field in the maxuser table where the user status is still active but is still part of your inactivation list.
Best to experiment in a test environment to make sure your escalation is working properly.
You commented to +Sun that "Maximo is synchronized with LDAP". In that case, try this:
Update the UserMapping on the existing instance of the LDAPSYNC Cron Task to look for a flag that indicates that the user is active in LDAP. (Exactly what to look for will depend on your organization. Your LDAP administrators should be able to help you.) Then, make a second instance of the LDAPSYNC Cron Task that looks identical to the first, except that (1) the GroupMapping doesn't find any groups (use a condition like (objectName=DOES_NOT_EXIST) that won't find anything), and (2) the UserMapping looks for the flag indicating the user is not active and has {INACTIVE} mapped to the STATUS attribute of MAXUSER.

Is there a way (LotusScript or Formula Language) to obtain a list of document secret encryption keys in the current ID?

I'd like to create a SecretEncryptionKeys dialog list field which prepopulates with the names of the available document keys in the current ID. Is there a way to do so? I cannot seem to find one in the documentation. (I can find #Command([UserIDEncryptionKeys]), but that just opens the Encryption dialog.)
This is a follow-on to Is it possible to programmatically tell Lotus Notes to generate a new secret key? , since I don't want the people who instantiate the new database to have to edit the forms involved to set the default encryption key. If they do, the next time the design on the database instance is refreshed from the template the settings will be overwritten.
The last time I checked in with IBM engineers about this, the answer was no. That was probably about 10 years ago, however I just took a quick look at the Notes 9 API Reference and I don't see anything there that would expose the list of keys, so I suspect that the answer is still no.

Load Runner facing isse during Dyanmic data handling

I am using load runner 9.5. I am facing a problem during Dyanmic data handling. Scenario is given below-
I have Library management application. Login-> Select book(data display based on User credential) -->Purchage and Logout.
Ex: Guest user: 50 Books display to choose
Admin : All Books display choose
Normal user : 100 Bokks display choose
Please help me How to handle these type of dynamic data based on user role. Is there need to create different script with different role ?
Please follow the below steps -
Record the same flow with the same user credential 2 times (Replica of first script)
Compare the scripts using W diff
Find the values which are different like purchase order, timestamp and user session.
Correlate the values which are highlighted in yellow means value which is different in each script.
Have you had the benefit of training in LoadRunner and a mentor for your first year of work in this field?

Reports on Liferay Usage

I'm benchmarking some CMS's for future use. I would like to know if with Liferay it's possible to have (extensions or api's) reports of back office usage.
Examples:
Users that don't create/update content for more than X days?
Content Areas that don't have new content for more than X days?
Number of contents waiting approval?
Thank you.
a) For the users you could create a listener that is called whenever a content is created, a seperate table with the serviceBuilder could store those and every X days you could read from that table and check which users are missing
b) content areas? in case you mean webContent you can get the modified date, also i think here it would be easier to create a listener (again). If something is changed it saves the changes somewhere and you can check it every X days
c) JournalArticleLocalServiceUtil can bring you all articles and you can check their state, or you create a custom query to just load those with specific states (i.e. WorkflowConstants.STATUS_PENDING)

Expression engine: Maximum number of entries allowed per membrr group

Is it possible to limit the number of channel entries a member can create?
I would like to set a max number per member group.
Thanks
Yes, but it would require writing an extension. The logic would be something like this (assuming you're talking about limiting on the back-end ... from the front-end, if you're using a Safecracker entry form for example, you'd need to take a different approach):
use the sessions_end hook
check to make sure you're in the control panel ($this->EE->input->get('D') == 'cp')
check to make sure you're on the publish screen ($this->EE->input->get('C') ==
'content_publish')
query the database to see how many entries in exp_channel_titles with the channel_id of $this->EE->input->get('channel_id') belong to $this->EE->session->userdata('member_id')
if the result is greater than your allowed maximum, show them an error
That should get you started.

Resources