Skip to content
Permalink
Browse files
formatting
  • Loading branch information
olamy committed Feb 5, 2015
1 parent 88a2ef7 commit 8edcb36b955d650439e77de753c3acca0f151b9b
Showing 2 changed files with 18 additions and 8 deletions.
@@ -75,7 +75,7 @@
import java.util.List;
import java.util.Set;

@Service("userService#rest")
@Service( "userService#rest" )
public class DefaultUserService
implements UserService
{
@@ -89,7 +89,7 @@
private SecuritySystem securitySystem;

@Inject
@Named(value = "userConfiguration#default")
@Named( value = "userConfiguration#default" )
private UserConfiguration config;

@Inject
@@ -99,28 +99,28 @@
* cache used for user assignments
*/
@Inject
@Named(value = "cache#userAssignments")
@Named( value = "cache#userAssignments" )
private Cache userAssignmentsCache;

/**
* cache used for user permissions
*/
@Inject
@Named(value = "cache#userPermissions")
@Named( value = "cache#userPermissions" )
private Cache userPermissionsCache;

/**
* Cache used for users
*/
@Inject
@Named(value = "cache#users")
@Named( value = "cache#users" )
private Cache usersCache;

@Inject
private Mailer mailer;

@Inject
@Named(value = "rbacManager#default")
@Named( value = "rbacManager#default" )
private RBACManager rbacManager;

private HttpAuthenticator httpAuthenticator;
@@ -132,9 +132,9 @@
private HttpServletRequest httpServletRequest;

@Inject
public DefaultUserService( @Named(value = "userManager#default") UserManager userManager,
public DefaultUserService( @Named( value = "userManager#default" ) UserManager userManager,
SecuritySystem securitySystem,
@Named("httpAuthenticator#basic") HttpAuthenticator httpAuthenticator )
@Named( "httpAuthenticator#basic" ) HttpAuthenticator httpAuthenticator )
{
this.userManager = userManager;
this.securitySystem = securitySystem;
@@ -306,6 +306,7 @@ public Boolean updateMe( User user )
RedbackRequestInformation redbackRequestInformation = RedbackAuthenticationThreadLocal.get();
if ( redbackRequestInformation == null || redbackRequestInformation.getUser() == null )
{
log.warn( "RedbackRequestInformation from ThreadLocal is null" );
throw new RedbackServiceException( new ErrorMessage( "you must be logged to update your profile" ),
Response.Status.FORBIDDEN.getStatusCode() );
}
@@ -789,6 +790,10 @@ public Collection<Permission> getCurrentUserPermissions()
{
userName = redbackRequestInformation.getUser().getUsername();
}
else
{
log.warn( "RedbackRequestInformation from ThreadLocal is null" );
}

return getUserPermissions( userName );
}
@@ -802,6 +807,10 @@ public Collection<Operation> getCurrentUserOperations()
{
userName = redbackRequestInformation.getUser().getUsername();
}
else
{
log.warn( "RedbackRequestInformation from ThreadLocal is null" );
}

return getUserOperations( userName );
}
@@ -31,6 +31,7 @@
<logger name="org.springframework" level="error"/>
<logger name="org.apache.archiva.redback.components.cache" level="error"/>
<logger name="org.apache.archiva.redback.rest.services.interceptors" level="debug"/>
<logger name="org.apache.archiva.redback.rest.services" level="debug"/>
<logger name="JPOX" level="ERROR"/>
<root level="info">
<appender-ref ref="console"/>

0 comments on commit 8edcb36

Please sign in to comment.