This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch redback-2.6.x
in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git


The following commit(s) were added to refs/heads/redback-2.6.x by this push:
     new de51f445 change to 405 Method Not Allowed
de51f445 is described below

commit de51f445ee8392215690886e7040dbb4a57df706
Author: Olivier Lamy <[email protected]>
AuthorDate: Thu Jun 22 16:52:39 2023 +1000

    change to 405 Method Not Allowed
    
    Signed-off-by: Olivier Lamy <[email protected]>
---
 .../org/apache/archiva/redback/rest/services/DefaultUserService.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultUserService.java
 
b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultUserService.java
index afbb822a..dde45e51 100644
--- 
a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultUserService.java
+++ 
b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/DefaultUserService.java
@@ -635,7 +635,7 @@ public class DefaultUserService
 
         if 
(Boolean.getBoolean(UserConfiguration.USER_REGISTRATION_DISABLE_KEY))
         {
-            throw new RedbackServiceException( new ErrorMessage("Registration 
Disabled"));
+            throw new RedbackServiceException( new ErrorMessage("Registration 
Disabled"), Response.Status.METHOD_NOT_ALLOWED.getStatusCode());
         }
 
         User user = userRegistrationRequest.getUser();

Reply via email to