[Bug 599066] Create a specific check for the gnomeweb user from l10n.gnome.org



https://bugzilla.gnome.org/show_bug.cgi?id=599066
  sysadmin | Git | unspecified

Alexandro Silva <alexoslabs> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alexoslabs gmail com

--- Comment #2 from Alexandro Silva <alexoslabs gmail com> 2010-07-06 14:20:08 UTC ---
Git Hook created.

Can you test please?

Regards,

Alexandro Silva

(In reply to comment #0)
> Our l10n infrastructure on l10n.gnome.org would like to be able to auto-commit
> files from the Web application Damned-Lies.
> For security concerns, it has been decided by the sysadmin team that this would
> require a specific git hook to check that only acceptable files are committed
> by this account.
> 
> Basically, the hook should be like the snippet below. I've no idea if the
> committer name or email is forgeable though.
> 
> #!/bin/bash
> 
> check_gnomeweb() {
>     path=$1
> 
>     case "$path" in
>         *.po|LINGUAS)
>             ;;
>         *)
>             echo "Unauthorized file for gnomeweb user: $path"
>             exit 1
>     esac
> }
> 
> committer_name="$(git log $commit -1 --pretty=format:%cn)"
> if [ $committer_name = "Gnomeweb" ] ; then
>     git diff-tree --name-only -r $oldrev $newrev | (
>         while read path ; do
>             check_gnomeweb $path
>         done
>     )
> fi

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the QA contact of the bug.
You are watching the assignee of the bug.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]