@Override
  public void hardDeleteStoresByNames(String... storeNames) {
    ensure(
        permissionsService.canDeleteStores(storeNames),
        "Cannot delete at least 1 store among stores : %s",
        Arrays.toString(storeNames));

    storeDao.hardDeleteStoresByNames(storeNames);
  }
  @Override
  public List<UserIdentity> getStoreUsers(String storeToken) {
    ensure(
        permissionsService.canBrowseStoreUsers(storeToken),
        "Cannot browse store [%s]'s users",
        storeToken);

    return storeDao.getStoreUsers(storeToken);
  }
  @Override
  public void attachUserToStores(Long userId, StoreRole storeRole, String... storeNames) {
    ensure(
        permissionsService.canRemoveUserFromStores(storeNames),
        "Cannot remove user %s from stores : %s",
        userId,
        Arrays.toString(storeNames));

    for (String storeName : storeNames) {
      storeDao.attachUserToStore(userId, storeName, storeRole);
    }
  }
  @Override
  public void createStore(FlatStore store) {
    ensure(permissionsService.canCreateNewStore(), "Cannot create a new store");

    storeDao.createStore(store);
  }