Fix isAdmin and isReadOnly for collections.

master
Tom Hacohen 4 years ago
parent 4047638e6f
commit f28d4f6af0

@ -168,11 +168,8 @@ export default function CalendarsMain() {
return (<PageNotFound />); return (<PageNotFound />);
} }
/* FIXME:
const collection = collections!.find((x) => x.uid === colUid)!; const collection = collections!.find((x) => x.uid === colUid)!;
const readOnly = collection.accessLevel; const readOnly = collection.accessLevel === Etebase.CollectionAccessLevel.ReadOnly;
*/
const readOnly = false;
return ( return (
<Switch> <Switch>

@ -7,6 +7,8 @@ import IconEdit from "@material-ui/icons/Edit";
import IconMembers from "@material-ui/icons/People"; import IconMembers from "@material-ui/icons/People";
import IconImport from "@material-ui/icons/ImportExport"; import IconImport from "@material-ui/icons/ImportExport";
import * as Etebase from "etebase";
import AppBarOverride from "../widgets/AppBarOverride"; import AppBarOverride from "../widgets/AppBarOverride";
import Container from "../widgets/Container"; import Container from "../widgets/Container";
@ -42,7 +44,7 @@ class Collection extends React.Component<PropsType> {
public render() { public render() {
const { collection, metadata } = this.props.collection; const { collection, metadata } = this.props.collection;
const isAdmin = true; // FIXME const isAdmin = collection.accessLevel === Etebase.CollectionAccessLevel.Admin;
return ( return (
<React.Fragment> <React.Fragment>

@ -160,11 +160,8 @@ export default function ContactsMain() {
return (<PageNotFound />); return (<PageNotFound />);
} }
/* FIXME:
const collection = collections!.find((x) => x.uid === colUid)!; const collection = collections!.find((x) => x.uid === colUid)!;
const readOnly = collection.accessLevel; const readOnly = collection.accessLevel === Etebase.CollectionAccessLevel.ReadOnly;
*/
const readOnly = false;
return ( return (
<Switch> <Switch>

@ -162,11 +162,8 @@ export default function TasksMain() {
return (<PageNotFound />); return (<PageNotFound />);
} }
/* FIXME:
const collection = collections!.find((x) => x.uid === colUid)!; const collection = collections!.find((x) => x.uid === colUid)!;
const readOnly = collection.accessLevel; const readOnly = collection.accessLevel === Etebase.CollectionAccessLevel.ReadOnly;
*/
const readOnly = false;
return ( return (
<Switch> <Switch>

Loading…
Cancel
Save