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

is that possible and how can we control the write right in files/folders level within rational team concert 4.0.6

Dear All,

May I have your help?
We have business need to restrict the "write" permission for files/folder in RTC4.0.6 or RTC4.0.7.
This is not in component level but requests in file/folder level.
is that possible and how?

Thank you very much!

Best regards,
RicharCAI

0 votes



2 answers

Permanent link
Richar Cai,

Yes, you will have to add a precondition trigger on the 'Deliver Phase 2 (server)' action. Although it is not as automatic as you may prefer.

The first thing you should do is create a RTC Team Area or new RTC Project role within the RTC Project to identify the people who will end up with write access (either adding them to the new RTC team or giving them membership to the new role, whichever you end up choosing.)

Once that is done, open your Project (I'm using Eclipse), go to Process Configuration -> Team Configuration -> Operation Behavior -> Source Control -> Deliver Phase 2 (server). Check the 'Preconditions...' checkbox and add the trigger 'Restrict Changes to Items'.

At the bottom of the precondition make sure to select the stream that the trigger should resolve paths against (different streams can have the content located in different places if users decided to move code around, which is why I believe this is required.) After that you select the component and drill down to the files underneath the directory structure you want to lock down. Unfortunately it doesn't appear there is any easy way to recursively set a parent directory so you'll have to add all the files.

Remember that this is triggered on a deliver operation. Users can still checkin changes to these files but they won't be able to deliver them, so you may get some developer grief that it wasn't caught sooner. If this is an issue, you may want to look at putting in locks on the files to make it more obvious to them early-on. I believe this also doesn't lock out directories so users may be able to add new files underneath that directory.

If you need more control over directories as well, there is another precondition on the same phase called 'Restrict Changes by Item Name' where you can restrict specific change types to folders (as well as files.)

https://jazz.net/library/article/1075

0 votes

Comments

This is not entirely correct. The advisor is intended to restrict changes to individual_items. You cannot use that advisor to say "all files under file /x/y/z cannot be modified".

@rcjusen

I haven't tested it myself, but it appears it takes regular expressions to test against all items in a changeset. I'm verifying against the jazz.net article: https://jazz.net/library/article/1075#com.ibm.team.process.definitions.server.deltaProtectFileType

Specifically it states:

Prevent changes to files, folders, or symbolic links based on their name.

Items can be matched with path globbing operators ( * indicating zero or more characters, or ? indicating exactly one character) or Java regular expressions. ... matching items will either be allowed (ie, all items in a change set must match the pattern) or blocked (ie, no items in a change set may match the pattern).

... To require the entire name to match, use a caret ( ^ ) and dollar sign ( $ ) to anchor the regex to the start and end of the string.



Sure. If you put in 'test.txt' you can tweak the advisor to block both test1.txt and test2.txt and if a change set contains one or both of these items the delivery will be blocked.

My point is that you cannot try to punch in '/x/y/z/
' and block all changes in the /x/y/z folder.

Just tested this out, and Remy Suen is correct.

The precondition will only check against the direct item name without its parent path information like so:



I will amend my original answer to reflect this.


Permanent link
https://jazz.net/library/article/215

It sounds like you want item permissions. You can set them on individual files and folders (which can apply to all children).

0 votes

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
× 1,204

Question asked: Sep 11 '14, 12:56 p.m.

Question was seen: 3,362 times

Last updated: Sep 12 '14, 12:38 p.m.

Confirmation Cancel Confirm