Upload umask decorator

Vincent Ladeuil v.ladeuil+lp at free.fr
Thu Mar 12 13:16:41 GMT 2009


>>>>> "Lukas" == Lukas Zapletal <lukas91 at zapletalovi.com> writes:

    Lukas> Lukas Zapletal napsal(a):
    >> Hello,
    >> 
    >> I am writing brand new decorator that will allow users to set
    >> upload umask. It will change mode of all newly created
    >> files/dirs according the provided umask.
    >> 
    >> The decorator called UpmaskDecorator (prefix upmask+) will read
    >> configuration value upload_mask from authentication.conf. If
    >> specified and the decorator is used than all new files and dirs
    >> will be created
    >> using this mask as the well known UNIX util umask.
    >> 
    >> Do you think its ok to have this configuration in this file?
    >> There is already verify_certificates which applies to HTTPS. Or
    >> do you suggest any other location for this variable?
    >> 
    >> There is other solution - without any variable at all. In this
    >> scenario the mask could be encoded in the prefix. Like
    >> upmask777+ or upmask766+ but I dont think this is good idea.
    >> 
    >> Thanks for comments.
    >> 

    Lukas> Better for me to create a merge and wait for discussion on it?

Better follow-up in the thread where we started discussing it  :-)

>>>>> "vila" == Vincent Ladeuil <v.ladeuil+lp at free.fr> writes:

>>>>> "Lukas" == Lukas Zapletal <lukas91 at zapletalovi.com> writes:

<snip/>

    Lukas> It would be nice to have this feature in the
    Lukas> authorization.conf - something like default_perms. It
    Lukas> could be used by users in such situations described
    Lukas> above.

    vila> Given that we need support from the server side to reliably
    vila> implement that, authentication.conf sounds like the right
    vila> place (locations.conf and branch.conf being more targeted at
    vila> the local side of things).

    vila> On the other hand, finding the right place to acquire that
    vila> setting may not be obvious, the transport layer seems like the
    vila> appropriate place to do that and a transport is indeed available
    vila> in _find_creation_modes(), so that may work.

Have a look there, I don't think a decorator is the right approach, it's
not even needed and will make using the feature more complicated.

    Vincent



More information about the bazaar mailing list