Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F10352689
groups.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
659 B
Referenced Files
None
Subscribers
None
groups.ts
View Options
import
{
Collection
,
FieldTypes
,
Policies
}
from
"sealious"
;
import
{
Roles
}
from
"../policy-types/roles.js"
;
export
default
class
Groups
extends
Collection
{
fields
=
{
name
:
new
FieldTypes
.
Text
(),
};
defaultPolicy
=
new
Policies
.
LoggedIn
();
policies
=
{
create
:
new
Roles
([
"admin"
]),
edit
:
new
Roles
([
"admin"
]),
};
async
populate
()
:
Promise
<
void
>
{
if
(
await
this
.
app
.
Metadata
.
get
(
"groups_populated"
))
{
return
;
}
// eslint-disable-next-line no-console
console
.
log
(
"### Populating groups"
);
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
await
this
.
app
.
Metadata
.
set
(
"groups_populated"
,
"true"
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sun, Nov 2, 17:58 (1 d, 8 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1012361
Default Alt Text
groups.ts (659 B)
Attached To
Mode
rAPROXY Assetproxy
Attached
Detach File
Event Timeline
Log In to Comment