Class AccessManagementServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.AccessManagementServiceImpl
-
- All Implemented Interfaces:
AccessManagementService
@Service public class AccessManagementServiceImpl extends java.lang.Object implements AccessManagementService
-
-
Field Summary
Fields Modifier and Type Field Description private ProfileRepositoryprofileRepositoryprivate SellerSkuRepositorysellerSkuRepositoryprivate SellersProxysellersProxyprivate UserManagementServiceuserManagementService
-
Constructor Summary
Constructors Constructor Description AccessManagementServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProfilegetLoggedProfile()This method does return database entity which logged in system.SellergetLoggedSeller()This method does return database entity which logged in system.UsergetLoggedUser()This method does return database entity which logged in system.booleanhasAccessToOrder(Order order)Checks if current user has rights to edit the order or to view detailsbooleanisAdmin()This method checks access for admin rightsbooleanisAllSellerSkusAllowsToProcess(java.util.List<java.lang.String> sellerSkuIds)This method checks access to perform actions with SellerSKU's itembooleanisAllSellerSkusBelongsToLoggedUser(java.util.List<java.lang.String> sellerSkuIds)This method checks access to perform actions with SellerSKU's itembooleanisLogged()This method checks user is loggedbooleanisSellerSkuAllowsToProcess(java.lang.String sellerSkuId)This method checks access to perform actions with SellerSKU itembooleanisSellerSkuBelongsToLoggedUser(java.lang.String sellerSkuId)This method checks access to perform actions with SellerSKU item
-
-
-
Field Detail
-
sellersProxy
@Autowired private SellersProxy sellersProxy
-
profileRepository
@Autowired private ProfileRepository profileRepository
-
sellerSkuRepository
@Autowired private SellerSkuRepository sellerSkuRepository
-
userManagementService
@Autowired private UserManagementService userManagementService
-
-
Method Detail
-
isLogged
public boolean isLogged()
Description copied from interface:AccessManagementServiceThis method checks user is logged- Specified by:
isLoggedin interfaceAccessManagementService- Returns:
- true or false
-
isAdmin
public boolean isAdmin()
Description copied from interface:AccessManagementServiceThis method checks access for admin rights- Specified by:
isAdminin interfaceAccessManagementService- Returns:
- true or false
-
getLoggedProfile
public Profile getLoggedProfile()
Description copied from interface:AccessManagementServiceThis method does return database entity which logged in system.- Specified by:
getLoggedProfilein interfaceAccessManagementService- Returns:
- database entity
-
getLoggedSeller
public Seller getLoggedSeller()
Description copied from interface:AccessManagementServiceThis method does return database entity which logged in system.- Specified by:
getLoggedSellerin interfaceAccessManagementService- Returns:
- database entity
-
getLoggedUser
public User getLoggedUser()
Description copied from interface:AccessManagementServiceThis method does return database entity which logged in system.- Specified by:
getLoggedUserin interfaceAccessManagementService- Returns:
- database user entity
-
isSellerSkuBelongsToLoggedUser
public boolean isSellerSkuBelongsToLoggedUser(java.lang.String sellerSkuId)
Description copied from interface:AccessManagementServiceThis method checks access to perform actions with SellerSKU item- Specified by:
isSellerSkuBelongsToLoggedUserin interfaceAccessManagementService- Parameters:
sellerSkuId- - this is identification for entity item- Returns:
- true or false
-
isSellerSkuAllowsToProcess
public boolean isSellerSkuAllowsToProcess(java.lang.String sellerSkuId)
Description copied from interface:AccessManagementServiceThis method checks access to perform actions with SellerSKU item- Specified by:
isSellerSkuAllowsToProcessin interfaceAccessManagementService- Parameters:
sellerSkuId- - this is identification for entity item- Returns:
- true or false
-
isAllSellerSkusBelongsToLoggedUser
public boolean isAllSellerSkusBelongsToLoggedUser(java.util.List<java.lang.String> sellerSkuIds)
Description copied from interface:AccessManagementServiceThis method checks access to perform actions with SellerSKU's item- Specified by:
isAllSellerSkusBelongsToLoggedUserin interfaceAccessManagementService- Parameters:
sellerSkuIds- - this is identifications for entity items- Returns:
- true or false
-
isAllSellerSkusAllowsToProcess
public boolean isAllSellerSkusAllowsToProcess(java.util.List<java.lang.String> sellerSkuIds)
Description copied from interface:AccessManagementServiceThis method checks access to perform actions with SellerSKU's item- Specified by:
isAllSellerSkusAllowsToProcessin interfaceAccessManagementService- Parameters:
sellerSkuIds- - this is identifications for entity items- Returns:
- true or false
-
hasAccessToOrder
public boolean hasAccessToOrder(Order order)
Description copied from interface:AccessManagementServiceChecks if current user has rights to edit the order or to view details- Specified by:
hasAccessToOrderin interfaceAccessManagementService- Parameters:
order- order to check- Returns:
true— if has access
-
-