Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
2e926601
Commit
2e926601
authored
Nov 18, 2013
by
Christian Dupuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
dba8c010
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
CrshAutoConfiguration.java
...ork/boot/actuate/autoconfigure/CrshAutoConfiguration.java
+3
-3
ShellProperties.java
...ingframework/boot/actuate/properties/ShellProperties.java
+3
-5
CrshAutoConfigurationTests.java
...oot/actuate/autoconfigure/CrshAutoConfigurationTests.java
+5
-3
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfiguration.java
View file @
2e926601
...
...
@@ -133,7 +133,7 @@ public class CrshAutoConfiguration {
@Bean
@ConditionalOnExpression
(
"'${shell.auth:simple}' == 'spring'"
)
@ConditionalOnMissingBean
({
CrshShellAuthenticationProperties
.
class
})
public
CrshShellAuthenticationProperties
S
pringAuthenticationProperties
()
{
public
CrshShellAuthenticationProperties
s
pringAuthenticationProperties
()
{
return
new
SpringAuthenticationProperties
();
}
...
...
@@ -370,7 +370,7 @@ public class CrshAutoConfiguration {
}
/**
* {@link FSDriver} to
expose Spring {@link Resource}s
to CRaSH.
* {@link FSDriver} to
wrap Spring's {@link Resource} abstraction
to CRaSH.
*/
private
static
class
SimpleFileSystemDriver
extends
AbstractFSDriver
<
ResourceHandle
>
{
...
...
@@ -466,7 +466,7 @@ public class CrshAutoConfiguration {
}
/**
* {@link ResourceHandle} for a file.
* {@link ResourceHandle} for a file
backed by a Spring {@link Resource}
.
*/
private
static
class
FileHandle
extends
ResourceHandle
{
...
...
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/properties/ShellProperties.java
View file @
2e926601
...
...
@@ -337,14 +337,12 @@ public class ShellProperties {
public
static
class
SpringAuthenticationProperties
extends
CrshShellAuthenticationProperties
{
private
String
[]
roles
=
new
String
[]
{
"
ROLE_
ADMIN"
};
private
String
[]
roles
=
new
String
[]
{
"ADMIN"
};
@Override
protected
void
applyToCrshShellConfig
(
Properties
config
)
{
if
(
this
.
roles
!=
null
)
{
config
.
put
(
"crash.auth.spring.roles"
,
StringUtils
.
arrayToCommaDelimitedString
(
this
.
roles
));
}
config
.
put
(
"crash.auth.spring.roles"
,
StringUtils
.
arrayToCommaDelimitedString
(
this
.
roles
));
}
public
void
setRoles
(
String
[]
roles
)
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/autoconfigure/CrshAutoConfigurationTests.java
View file @
2e926601
...
...
@@ -314,8 +314,8 @@ public class CrshAutoConfigurationTests {
authentication
=
new
UsernamePasswordAuthenticationToken
(
authentication
.
getPrincipal
(),
authentication
.
getCredentials
(),
Collections
.
singleton
(
new
SimpleGrantedAuthority
(
"ROLE_
ADMIN"
)));
Collections
.
singleton
(
new
SimpleGrantedAuthority
(
"
ADMIN"
)));
}
else
{
throw
new
BadCredentialsException
(
"Invalid username and password"
);
...
...
@@ -328,7 +328,9 @@ public class CrshAutoConfigurationTests {
@Bean
public
AccessDecisionManager
accessDecisionManager
()
{
List
<
AccessDecisionVoter
>
voters
=
new
ArrayList
<
AccessDecisionVoter
>();
voters
.
add
(
new
RoleVoter
());
RoleVoter
voter
=
new
RoleVoter
();
voter
.
setRolePrefix
(
""
);
voters
.
add
(
voter
);
AccessDecisionManager
result
=
new
UnanimousBased
(
voters
);
return
result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment