Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is it possible to let a user acquire a lock but not release it?

 Hi,

I want to achieve the following: Once a user starts working in a file, the file should be locked and it should remain like that until it a validation is done. The user should not be able to release the lock of that file but it is done automatically (using some kind of participant extension).

Is this possible? 

Regards,
Francisco R.

0 votes


Accepted answer

Permanent link

The permissions for locking and unlocking files are the same, presumably because only the same user can unlock something they locked (or a Jazz Admin).

Ignoring this permissions issue, you would have to develop a script/operational behavior extension to release the lock.  Maybe you should make this automation take both sides of the issue.  When a user starts working in a file, the file is locked by a script using some service account (maybe it can run as the system itself, haven't written any myself lately).  The script would then unlock it with the same service account when the validation is done.  I don't know how you want to determine "working in a file"; if you lock it when the user checks it out that could get annoying to the other users, but I don't know how your SCM is set up and utilized so maybe that is ok.  Regardless, sounds like a bunch of scripting is your option here.

David Lafreniere selected this answer as the correct answer

0 votes

Comments

Hello June. What do you mean by "service account"?

An account in your LDAP, or Tomcat registry or whatever you use, that isn't actually a person but instead is used by scripts or other processes, and has a big long complex password.  For example, the common reporting service account "rptuser" isn't logged into by any human, just other programs; I see one of these in most environments.  "Service account" isn't a CLM term, just a description; you would implement it as a normal account, making it a Jazz User (or a Jazz Admin if you need to).

In the example of this script: because only the user who locked a file can unlock a file, if the service account the script uses does all the locking/unlocking then your users won't be able to unlock the files, only the script account would (which it will do automatically after the validation).  The script's service account would need to be a member of the project and have a role that allows it to lock/unlock files, of course.  If you made it a Jazz Admin, it could probably work without being added to the project, and it could unlock files that your users lock.

 Okay, I now understand. So, do you have any idea of how to trigger the script when the user edits the file?

When you say edit, do you expect the users to probably have all files in their sandbox and only edit one of them?  If so... I'm not sure how to do that with Eclipse, though I'm sure it is possible.  Perhaps you could wait for the RTC event of a file being checked in from a sandbox to a workspace, and if that file wasn't previously locked you do so.

There are a lot of weird technical/business decisions relating to your needs and process you will have to make, and I haven't written extensions for source control behavior since CLM 3 so I don't think I could get more detailed on how to implement it.  This is just my theory on how to make CLM do what you need it to do, as extensions are useful to fill the gaps in CLM capabilities.

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,122
× 1,202
× 67
× 56

Question asked: Oct 21 '15, 6:15 p.m.

Question was seen: 3,228 times

Last updated: Oct 10 '17, 1:20 p.m.

Confirmation Cancel Confirm