svn: /web/doc-editor/trunk/php/ RepositoryManager.php

[email protected] (Yannick Torres)
Newsgroups php.doc.web
Message-ID <[email protected]>
yannick                                  Mon, 17 Jan 2011 21:22:23 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=307546

Log:
Allow valid VCS user to clear a local change made by an anonymous user

Changed paths:
    U   web/doc-editor/trunk/php/RepositoryManager.php

Modified: web/doc-editor/trunk/php/RepositoryManager.php
===================================================================
--- web/doc-editor/trunk/php/RepositoryManager.php	2011-01-17 21:21:17 UTC (rev 307545)
+++ web/doc-editor/trunk/php/RepositoryManager.php	2011-01-17 21:22:23 UTC (rev 307546)
@@ -1254,9 +1254,12 @@
             // Either the user who made the modification, either a global admin for this project, either a lang admin
             if( $a->user != $am->vcsLogin || ( $am->isAnonymous && ($a->anonymousIdent != $am->anonymousIdent) ) ) {
                 // This file isn't own by the current user
+
                 // Is the current user is a global admin or a lang admin ?
                 if( ! $am->isAdmin(true) ) {
-                    return 'file_isnt_owned_by_current_user';
+                    if( !(!$am->isAnonymous && $am->anonymous($a->user) ) ) {
+                        return 'file_isnt_owned_by_current_user';
+                    }
                 }
             }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.