CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
sagemathinc

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/util/db-schema/account-profiles.ts
Views: 687
1
/*
2
* This file is part of CoCalc: Copyright © 2020 Sagemath, Inc.
3
* License: MS-RSL – see LICENSE.md for details
4
*/
5
6
import { Table } from "./types";
7
8
Table({
9
name: "account_profiles",
10
rules: {
11
desc:
12
"(Virtual) Table that provides access to the profiles of all users; the profile is their *publicly visible* avatar.",
13
virtual: "accounts",
14
anonymous: false,
15
user_query: {
16
get: {
17
pg_where: [],
18
options: [{ limit: 1 }], // in case user queries for [{account_id:null, profile:null}] they should not get the whole database.
19
fields: {
20
account_id: null,
21
profile: {
22
image: undefined,
23
color: undefined,
24
},
25
},
26
},
27
},
28
},
29
});
30
31