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)
Only submit files I own
johnjamesmarsh
So it's like this. I have modified the submit workflow to only allow users to submit files that they have edited (from iwattrib <vpath> lastuser).
This is working fine except when they edit DCRs, the resulting HTML gets edited by the user nobody. As they didn't edit it they cannot submit it. I have a bright idea, only let them submit files they have a lock on.
Great! Ah, but what about deleted files. If you delete a file that is locked will it still be picked up?
Just tried that: No! What now? I guess I will end up with a check to see if you have the file locked, then a check to see if the file is deleted then a check to see if it was you who deleted the file.
All sounds a bit slow to me. Anyone got any better ideas?
Regards
John
Find more posts tagged with
Comments
Adam Stoller
As I just responded to something with this - I have it handy:
Under the
[iwserver]
section in the
iw.cfg
you can specify:
only_lock_owner_creator_submits=yes
Have you tried this to see if it resolves your issues?
--fish
(Interwoven Senior Technical Consultant)
johnjamesmarsh
I have:
only_lock_owner_creator_submits=yes
set already. Problem is that in order to submit a deleted folder you need to submit the parent folder. If you submit the parent folder and there are files modified by another user those files get included in the submit (multiple users using one work area). When that submit goes through the files that were added to the task locked by a different user cause the task to go into conflict. I know, my users have done this.
Thanks for the suggestion. I have implemented looking to see if your the lock owner and looking to see if you have deleted the file.
One thing though. I have put some debug output in default_submit.wft in the:
for (my $i=0; $i<
@submit_file
; ++$i) {.....}
section and it is geting executed 4 times. Does that normally happen?
Michael
Re: Problem is that in order to submit a deleted folder you need to submit the parent folder.
My experience has been that to submit a deleted folder you select List Modified from the View menu. The deleted folder will then be displayed and you can select it and submit.
Hope this helps.
Adam Stoller
I suppose one question here is, if other users have files locked within that directory - is it correct for you to to delete that directory?
Seems like a breakdown in communications.
However, if you have an externaltask that runs as a master user within your workflow, you could have it run iwhome/local/bin/unlock.pl - and that will remove all locks on all files associated with the workflog. It's pretty heavy handed, but it should work.
Alternatively, have the script cycle through all the files attached to the task, and determine whether the owner of the job is the owner of any lock present on the file, and if not, generate a list of exception and transition to a task where you can take some administrative action to determine whether or not this is an issue (and you should perhaps abort the job) or whether it's okay (and you then forcibly unlock all the files and proceed with the submit.
Hmm - (sorry, thinking while typing) - if the directory is deleted prior to the submission - then I'm not sure you'd see all the files deleted within that directory in the file list - haven't tried this out - so you may need to override the File > Delete menu with your own custom menu that performs such a check before allowing the action of deleting the directory to go through...
--fish
(Interwoven Senior Technical Consultant)
mdender
what happens if the file was modified by SYSTEM. Would the user still be able to submit the file?
Michael D. Ender
www.dow.com
p: 989.638.4163
Adam Stoller
Depends on who has the lock and whether or not you allow only the lock owner to submit files (an iw.cfg setting)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com