Handbook
Glossary
have-capabilities? ( capabilities -- ? )
Vocabulary
furnace
.
auth
Inputs
capabilities
a sequence of capabilities
Outputs
?
a
boolean
Word description
Tests if the currently logged-in user possesses the given capabilities.
Definition
USING:
accessors
combinators
furnace.redirection
kernel
namespaces
sets
;
IN:
furnace.auth
:
have-capabilities?
( capabilities -- ? )
realm
get
secure>>
secure-connection?
not
and
[
drop
f
]
[
logged-in-user
get
{
{
[
dup
not
]
[
2drop
f
]
}
{
[
dup
deleted>>
1
=
]
[
2drop
f
]
}
[
capabilities>>
subset?
]
}
cond
]
if
;