[4suite-dev] changing Aliases
Michael Olson
Mike.Olson at fourthought.com
Thu Jan 30 11:23:50 MST 2003
> But that's not what I'm really wondering about. I just ran into this:
>
> #You cannot change an aliases reference, so raise exception for now,
> we could lose ACL, owner, etc
> if repo.fetchResource(self.path, traverseAliases =
> 0).getReference().getAbsolutePath() != self.reference:
> raise RuntimeError("Unable to change the alias reference for %s,
> please remove alias by hand" % self.path)
>
> I don't really understand what's going on here, but why can't we have
> the
> update just delete the old alias and create a new one?
>
It is because there is no "setReference" method on an Alias. As the
comment says, if you want to delete, then recreate with a new
reference, you need to make sure that the ACL and ownership information
of the alias is properly transfered. WRT to ACL, make sure you only
transfer over the non-inherited ACL.
Though, I'll probably be adding a "setReference" function before to
long (as part of the dash board).
Mike
> Mike
>
> --
> Mike J. Brown | http://skew.org/~mike/resume/
> Denver, CO, USA | http://skew.org/xml/
> _______________________________________________
> 4suite-dev mailing list
> 4suite-dev at lists.fourthought.com
> http://lists.fourthought.com/mailman/listinfo/4suite-dev
>
------------------------------------------------------------------------
-----------------
Mike Olson Principal
Consultant
mike.olson at fourthought.com +1 303 583 9900
Fourthought, Inc.
http://Fourthought.com
PO Box 270590, http://4Suite.org
Louisville, CO 80027-5009, USA
XML strategy, XML tools, knowledge management
More information about the 4suite-dev
mailing list