You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@archiva.apache.org by "charles kim (JIRA)" <ji...@codehaus.org> on 2012/08/02 22:24:21 UTC

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

charles kim created MRM-1652:
--------------------------------

             Summary: Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
                 Key: MRM-1652
                 URL: https://jira.codehaus.org/browse/MRM-1652
             Project: Archiva
          Issue Type: Bug
    Affects Versions: 1.4-M1
         Environment: RHEL 6
            Reporter: charles kim


releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.

		<managedRepository>
			<location>/home/y/var/yarchiva/data/repositories/public</location>
			<blockRedeployments>true</blockRedeployments>
			<daysOlder>30</daysOlder>
			<id>public</id>
			<name>Archiva Managed Public Repository</name>
			<releases>false</releases>
		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305401#comment-305401 ] 

Olivier Lamy commented on MRM-1652:
-----------------------------------

with this patch I won't able to deploy snapshot to this repository if snapshot is true.
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "charles kim (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305402#comment-305402 ] 

charles kim commented on MRM-1652:
----------------------------------

I see. May be I need to modify the patch for that case.  I thought that by setting the releases=false would mean "no upload" at all. :)
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305426#comment-305426 ] 

Brett Porter commented on MRM-1652:
-----------------------------------

Those labels aren't great. At the moment they really just mean "don't scan for releases", but we've slowly been making them more enforceable. 

You could probably look at the section that does the 409 conflict if a release is redeployed, that has the right checks if an artifact is considered a release or not.
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305454#comment-305454 ] 

Brett Porter commented on MRM-1652:
-----------------------------------

The option is to not redeploy releases - so you can still upload them, but not a second time.

But it sounds like you want to remove deployment altogether - the more appropriate way to do that is to change the users permissions so they don't have the manager role for that repository.

All that said, I think you're still correct to do a 405 if releases was not checked AND the artifact has a release version. I was suggesting you could pick that code out from the similar 409 call for the first one.
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MRM-1652.
-----------------------------

       Resolution: Cannot Reproduce
    Fix Version/s:     (was: 1.4-M3)

please reopen if you have a unit test to reproduce that.
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "charles kim (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

charles kim updated MRM-1652:
-----------------------------

    Attachment: ArchivaDavResourceFactory_patch.txt
    
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305487#comment-305487 ] 

Olivier Lamy commented on MRM-1652:
-----------------------------------

AFAIK we have the property blockRedeployments for that ?
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MRM-1652:
------------------------------

    Fix Version/s: 1.4-M3
         Assignee: Olivier Lamy
    
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "charles kim (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305486#comment-305486 ] 

charles kim commented on MRM-1652:
----------------------------------

Okay. Title of issue should say 'Archiva should throw 405 (Method not allowed) when "releases=false" and artifact has a release version in archiva.xml'. I couldn't find a way to change it. :)

 

                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MRM-1652) Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml

Posted by "charles kim (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MRM-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=305447#comment-305447 ] 

charles kim commented on MRM-1652:
----------------------------------

What would be the configuration for disabling uploading to the repository then? I thought 'releases' would be it seen from the comment fin the code.
                
> Archiva should throw 405 (Method not allowed) when "releases=false" in archiva.xml
> ----------------------------------------------------------------------------------
>
>                 Key: MRM-1652
>                 URL: https://jira.codehaus.org/browse/MRM-1652
>             Project: Archiva
>          Issue Type: Bug
>    Affects Versions: 1.4-M1
>         Environment: RHEL 6
>            Reporter: charles kim
>            Assignee: Olivier Lamy
>             Fix For: 1.4-M3
>
>         Attachments: ArchivaDavResourceFactory_patch.txt
>
>
> releases is configured to false which should tell archiva that uploading should be disabled for the repo.  But the setting doesn't work as seen from the code.  Please see the attached patch. Thanks.
> 		<managedRepository>
> 			<location>/home/y/var/yarchiva/data/repositories/public</location>
> 			<blockRedeployments>true</blockRedeployments>
> 			<daysOlder>30</daysOlder>
> 			<id>public</id>
> 			<name>Archiva Managed Public Repository</name>
> 			<releases>false</releases>
> 		</managedRepository>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira