Skip to content

Commit

Permalink
Merge branch 'master' of github.com:scalableminds/webknossos into rom…
Browse files Browse the repository at this point in the history
…e-v11.0.0

* 'master' of github.com:scalableminds/webknossos:
  Fix publicly shared annotations (#6784)
  • Loading branch information
hotzenklotz committed Jan 26, 2023
2 parents f5d38a3 + c27cfff commit 444c455
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug where direct task assignment to a single user would fail. [#6777](https://github.com/scalableminds/webknossos/pull/6777)
- Fixed a bug where the dataset folders view would not list public datasets if the requesting user could not also access the dataset for other reasons, like being admin. [#6759](https://github.com/scalableminds/webknossos/pull/6759)
- Fixed a bug where zarr-streamed datasets would produce (very rare) rendering errors. [#6782](https://github.com/scalableminds/webknossos/pull/6782)
- Fixed a bug where publicly shared annotations were not viewable by users without an account. [#6784](https://github.com/scalableminds/webknossos/pull/6784)

### Removed

Expand Down
10 changes: 7 additions & 3 deletions frontend/javascripts/components/secured_route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { PageUnavailableForYourPlanView } from "components/pricing_enforcers";
import type { ComponentType } from "react";
import type { RouteComponentProps } from "react-router-dom";
import type { OxalisState } from "oxalis/store";
import { enforceActiveOrganization } from "oxalis/model/accessors/organization_accessors";

type StateProps = {
activeOrganization: APIOrganization | null;
Expand Down Expand Up @@ -69,10 +68,15 @@ class SecuredRoute extends React.PureComponent<SecuredRouteProps, State> {
return <LoginView redirect={this.props.location.pathname} />;
}

const organization = enforceActiveOrganization(this.props.activeOrganization);
if (
this.props.requiredPricingPlan &&
!isPricingPlanGreaterEqualThan(organization.pricingPlan, this.props.requiredPricingPlan)
!(
this.props.activeOrganization &&
isPricingPlanGreaterEqualThan(
this.props.activeOrganization.pricingPlan,
this.props.requiredPricingPlan,
)
)
) {
return <PageUnavailableForYourPlanView />;
}
Expand Down

0 comments on commit 444c455

Please sign in to comment.