shopizer-memoizeit
Changes
sm-shop/SALESMANAGER.h2.db 0(+0 -0)
sm-shop/SALESMANAGER.lock.db 4(+2 -2)
Details
sm-shop/SALESMANAGER.h2.db 0(+0 -0)
diff --git a/sm-shop/SALESMANAGER.h2.db b/sm-shop/SALESMANAGER.h2.db
index c2aa508..29175b1 100644
Binary files a/sm-shop/SALESMANAGER.h2.db and b/sm-shop/SALESMANAGER.h2.db differ
sm-shop/SALESMANAGER.lock.db 4(+2 -2)
diff --git a/sm-shop/SALESMANAGER.lock.db b/sm-shop/SALESMANAGER.lock.db
index a747930..e7a5486 100644
--- a/sm-shop/SALESMANAGER.lock.db
+++ b/sm-shop/SALESMANAGER.lock.db
@@ -1,4 +1,4 @@
#FileLock
-#Thu Dec 22 13:18:21 EST 2016
-id=15927c159aed307ae4a61a235c2e3a186a7debb7ebd
+#Thu Dec 22 17:00:36 EST 2016
+id=159288cd18fe9c6c525439a3349263fa56c75d49eb2
method=file
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/store/controller/customer/facade/CustomerFacadeImpl.java b/sm-shop/src/main/java/com/salesmanager/shop/store/controller/customer/facade/CustomerFacadeImpl.java
index 8f0ae0d..3ccd3ea 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/store/controller/customer/facade/CustomerFacadeImpl.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/store/controller/customer/facade/CustomerFacadeImpl.java
@@ -72,6 +72,8 @@ public class CustomerFacadeImpl implements CustomerFacade
private static final Logger LOG = LoggerFactory.getLogger(CustomerFacadeImpl.class);
private final static int USERNAME_LENGTH=6;
+
+ public final static String ROLE_PREFIX = "ROLE_";//Spring Security 4
@Inject
@@ -390,7 +392,7 @@ public class CustomerFacadeImpl implements CustomerFacade
Validate.notNull(customer, "Customer cannot be null");
Collection<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>();
- GrantedAuthority role = new SimpleGrantedAuthority(Constants.PERMISSION_CUSTOMER_AUTHENTICATED);//required to login
+ GrantedAuthority role = new SimpleGrantedAuthority(ROLE_PREFIX + Constants.PERMISSION_CUSTOMER_AUTHENTICATED);//required to login
authorities.add(role);
List<Integer> groupsId = new ArrayList<Integer>();
List<Group> groups = customer.getGroups();
diff --git a/sm-shop/src/main/java/com/salesmanager/shop/store/security/CustomerServicesImpl.java b/sm-shop/src/main/java/com/salesmanager/shop/store/security/CustomerServicesImpl.java
index 451f305..b94db3e 100644
--- a/sm-shop/src/main/java/com/salesmanager/shop/store/security/CustomerServicesImpl.java
+++ b/sm-shop/src/main/java/com/salesmanager/shop/store/security/CustomerServicesImpl.java
@@ -8,6 +8,8 @@ import com.salesmanager.core.model.customer.Customer;
import com.salesmanager.core.model.user.Group;
import com.salesmanager.core.model.user.Permission;
import com.salesmanager.shop.admin.security.SecurityDataAccessException;
+import com.salesmanager.shop.constants.Constants;
+
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -37,6 +39,8 @@ public class CustomerServicesImpl implements UserDetailsService{
private static final Logger LOGGER = LoggerFactory.getLogger(CustomerServicesImpl.class);
+ public final static String ROLE_PREFIX = "ROLE_";//Spring Security 4
+
@Inject
private CustomerService customerService;
@@ -50,7 +54,6 @@ public class CustomerServicesImpl implements UserDetailsService{
- @SuppressWarnings("deprecation")
public UserDetails loadUserByUsername(String userName)
throws UsernameNotFoundException, DataAccessException {
@@ -66,6 +69,9 @@ public class CustomerServicesImpl implements UserDetailsService{
}
+
+ GrantedAuthority role = new SimpleGrantedAuthority(ROLE_PREFIX + Constants.PERMISSION_CUSTOMER_AUTHENTICATED);//required to login
+ authorities.add(role);
List<Integer> groupsId = new ArrayList<Integer>();
List<Group> groups = user.getGroups();
diff --git a/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties b/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
index 605cc05..3375e83 100644
--- a/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
+++ b/sm-shop/target/m2e-wtp/web-resources/META-INF/maven/com.shopizer/sm-shop/pom.properties
@@ -1,5 +1,5 @@
#Generated by Maven Integration for Eclipse
-#Thu Dec 22 12:56:43 EST 2016
+#Thu Dec 22 16:39:46 EST 2016
version=2.0.5-SNAPSHOT
groupId=com.shopizer
m2e.projectName=sm-shop