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 ProfileRepository
profileRepository
private SellerSkuRepository
sellerSkuRepository
private SellersProxy
sellersProxy
private UserManagementService
userManagementService
-
Constructor Summary
Constructors Constructor Description AccessManagementServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Profile
getLoggedProfile()
This method does returns database entity which logged in system.Seller
getLoggedSeller()
This method does returns database entity which logged in system.User
getLoggedUser()
This method does returns database entity which logged in system.boolean
hasAccessToOrder(Order order)
Checks if current user has rights to edit the order or to view detailsboolean
isAdmin()
This method checks access for admin rightsboolean
isAllSellerSkusAllowsToProcess(java.util.List<java.lang.String> sellerSkuIds)
This method checks access to perform actions with SellerSKU's itemboolean
isAllSellerSkusBelongsToLoggedUser(java.util.List<java.lang.String> sellerSkuIds)
This method checks access to perform actions with SellerSKU's itemboolean
isLogged()
This method checks user is loggedboolean
isSellerSkuAllowsToProcess(java.lang.String sellerSkuId)
This method checks access to perform actions with SellerSKU itemboolean
isSellerSkuBelongsToLoggedUser(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:AccessManagementService
This method checks user is logged- Specified by:
isLogged
in interfaceAccessManagementService
- Returns:
- true or false
-
isAdmin
public boolean isAdmin()
Description copied from interface:AccessManagementService
This method checks access for admin rights- Specified by:
isAdmin
in interfaceAccessManagementService
- Returns:
- true or false
-
getLoggedProfile
public Profile getLoggedProfile()
Description copied from interface:AccessManagementService
This method does returns database entity which logged in system.- Specified by:
getLoggedProfile
in interfaceAccessManagementService
- Returns:
- database entity
-
getLoggedSeller
public Seller getLoggedSeller()
Description copied from interface:AccessManagementService
This method does returns database entity which logged in system.- Specified by:
getLoggedSeller
in interfaceAccessManagementService
- Returns:
- database entity
-
getLoggedUser
public User getLoggedUser()
Description copied from interface:AccessManagementService
This method does returns database entity which logged in system.- Specified by:
getLoggedUser
in interfaceAccessManagementService
- Returns:
- database user entity
-
isSellerSkuBelongsToLoggedUser
public boolean isSellerSkuBelongsToLoggedUser(java.lang.String sellerSkuId)
Description copied from interface:AccessManagementService
This method checks access to perform actions with SellerSKU item- Specified by:
isSellerSkuBelongsToLoggedUser
in 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:AccessManagementService
This method checks access to perform actions with SellerSKU item- Specified by:
isSellerSkuAllowsToProcess
in 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:AccessManagementService
This method checks access to perform actions with SellerSKU's item- Specified by:
isAllSellerSkusBelongsToLoggedUser
in 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:AccessManagementService
This method checks access to perform actions with SellerSKU's item- Specified by:
isAllSellerSkusAllowsToProcess
in interfaceAccessManagementService
- Parameters:
sellerSkuIds
- - this is identifications for entity items- Returns:
- true or false
-
hasAccessToOrder
public boolean hasAccessToOrder(Order order)
Description copied from interface:AccessManagementService
Checks if current user has rights to edit the order or to view details- Specified by:
hasAccessToOrder
in interfaceAccessManagementService
- Parameters:
order
- order to check- Returns:
true
— if has
-
-