Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Change user last modification
fjvelasco
Hi
I'm searching the way to change the last modification user of a file using Perl. My script is a External Task and it calls to iwregen but the files are modified by "SYSTEM" and I want to put the user that executes the task.
I've searched but I didn't find anything... Someone can help me?
Platform: TS 6.1 W2K
Thanks a lot.
FJ
Find more posts tagged with
Comments
Dwayne
Switch to Unix. :-(
Unfortunately, this is a limitation of TeamSite under Windows. As I understand it, it's a function of the Windows security model. It's not possible to "impersonate" a user under Windows unless you have that user's password - even if you're the administrator. Since external task handlers have no way of knowing the user's password, the task runs as SYSTEM.
CGI tasks don't suffer from this problem, because the password is encoded in the session string that the web browser passes along with every request. That session string is meaningless in the the context of an external task.
So the only way around the problem that I know of is if, somehow, your external task handler can know the user's password. It could then use the "Run As" facility to impersonate that user.
--
Current project: TS 5.5.2/6.1 W2K
Adam Stoller
The problem on Windows is that there's no real setuid - For CGI tasks you can try wrapping them with the iw_cgi_wrapper.cgi. For externaltasks the question is who is listed as the owner of the externaltask process? (it's been a while since I've worked on Windows)
If the externaltask script is being run by 'some user' - then you can have the script touch/modify the files and that should set the last modified by information.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Dwayne
If the externaltask script is being run by 'some user' - then you can have the script touch/modify the files and that should set the last modified by information
It
has
ben a while since you've used Windows, hasn't it Fish?
This information is incorrect. Regardless of
which
user owns the external task, any modified files will
always
show as last modified by SYSTEM. As you said, it's a result of there not being a real setuid.
--
Current project: TS 5.5.2/6.1 W2K
fjvelasco
Thanks a lot but... Is there no way no function no API no CLT to change the last modified user of a file?
I cannot change to unix.
I only want to make: setLastModifiedUser ($sFile, $sUser)
:-(
It's incredible.
Dwayne
Is there no way no function no API no CLT to change the last modified user of a file?
I don't know of one. I haven't dug very deeply into the CSSDK v2 API, so there
may
be something there, but I doubt it.
I cannot change to unix.
I didn't think so. I was just expressing my feeling on the relative merits of the various platforms "supported" by TeamSite.
--
Current project: TS 5.5.2/6.1 W2K
mannyroble
Actually I just ran into this problem with a regen script as well. The way to do is to use the web desk pro cgi like this:
<action-list id="iw.ccpro.filesys.menubar">
<menu id="iw.ccpro.action.menu">
<separator id="cu.custom_menu_item.separator"/>
<link id="cu.regen_menu_item.link"
label="Regen"
description="This link regenerates all pages in the current selected directory within a user's workarea."
url="/iw-bin/wdpro_menu.ipl/regen.ipl"
target="_blank"
operationID="cu.ccpro.regen.op">
</link>
</menu>
</action-list>
I don't know how it exactly works, but it impersonates the user currently running the script and so the files will be modified by whoever runs it.
Manny
Dwayne
I don't know how it exactly works, but it impersonates the user currently running the script
It is able to impersonate the user because it's a CGI. That means that the web browser passes the session information, which includes, encoded, the userID, role, and password. That gives enough information to allow the system to impersonate the user.
--
Current project: TS 5.5.2/6.1 W2K
fjvelasco
I'm changing all my proccesses because this "feature". I cannot have files modified by SYSTEM because my users are ContentCenterStandard users and want to see their files in "Work in progress" portlet.
Thanks to all
FJ
Dwayne
Lissa, you monitoring this thread?
Sounds like a very good, relatively simple to implement feature request:
Method (CLT and/or CSSDK, preferrably both) to set the last modified by attribute of a file.
Usable only by masters (and possibly admins). Don't want "Joe Author" to be able to "steal" somebody else's work (or blame somebody else for theirs)
--
Current project: TS 5.5.2/6.1 W2K
Johnny
This has plagued me ever since I jumped onto a Windows machine.
It's never been touched, but some solution please!... after all these years.
In our external task we do set an EA with the owner the task, indicating who last generated via workflow.
So a user has to look at the file properties to see this.
We would have to come up with our own WIP portlet and my modified files view to make any real value of it....
John Cuiuli
Johnny
Actually I've brought this up before,
but the real trick here is to have templating pulled into Content Services.
That would be an ideal world way to have everything integrated nicely and not jumping in and out of the teamsite world to the OS world (PERL & CLT) which is where the problem lies.
But I suspect that is a world away itself... If at all?...
On top of that, workflow external tasks would need to hook into CS as well, which I think is in the works.. no?
An IWOV point of view would be good here.
John Cuiuli
fjvelasco
Hi
The Only Java World is far away because PERL scripts are more easily and more numerous than Java classes. The solutions are Perl and not Java. I don't know if the trouble is Perl or CLT. I've change my mind to work in Perl with TS and I don't know if I need to change more times, but if it is the way, I will change... but my customer, not.
Could Interwoven make a CLT to change the user last modification? Only a CLT, an executable... We will download it and copy to the iw-home/bin. It's easy... Is it easy? ;-)
FJ
civ3
I don't think there is a way so far. We had a case with Interwoven support this year. There is no result to keep modified information. What Interwoven suggest is to keep them in the metadata. That's what we use in our current project.