Gruppen-Steuerung #2
4
lib/plankton/plankton.d.ts
vendored
4
lib/plankton/plankton.d.ts
vendored
|
|
@ -658,6 +658,9 @@ declare namespace lib_plankton.call {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
export function sleep(seconds: float): Promise<void>;
|
export function sleep(seconds: float): Promise<void>;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
export function null_prop<type_value_from, type_value_to>(value_from: (null | type_value_from), function_: ((value: type_value_from) => type_value_to)): (null | type_value_to);
|
||||||
export {};
|
export {};
|
||||||
}
|
}
|
||||||
declare namespace lib_plankton.email {
|
declare namespace lib_plankton.email {
|
||||||
|
|
@ -4598,6 +4601,7 @@ declare namespace lib_plankton.auth.oidc {
|
||||||
name: (null | string);
|
name: (null | string);
|
||||||
label: (null | string);
|
label: (null | string);
|
||||||
email: (null | string);
|
email: (null | string);
|
||||||
|
groups: (null | Array<string>);
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1491,6 +1491,16 @@ var lib_plankton;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
call.sleep = sleep;
|
call.sleep = sleep;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function null_prop(value_from, function_) {
|
||||||
|
return ((value_from === null)
|
||||||
|
?
|
||||||
|
null
|
||||||
|
:
|
||||||
|
function_(value_from));
|
||||||
|
}
|
||||||
|
call.null_prop = null_prop;
|
||||||
})(call = lib_plankton.call || (lib_plankton.call = {}));
|
})(call = lib_plankton.call || (lib_plankton.call = {}));
|
||||||
})(lib_plankton || (lib_plankton = {}));
|
})(lib_plankton || (lib_plankton = {}));
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
|
@ -4056,10 +4066,10 @@ var lib_plankton;
|
||||||
options = Object.assign({
|
options = Object.assign({
|
||||||
"compare_value": instance_compare
|
"compare_value": instance_compare
|
||||||
}, options);
|
}, options);
|
||||||
if (is_empty(list)) {
|
/*if (is_empty<type_element>(list)) {
|
||||||
throw (new Error("the max-arg of an empty list is not defined"));
|
throw (new Error("the max-arg of an empty list is not defined"));
|
||||||
}
|
}
|
||||||
else {
|
else */ {
|
||||||
return (list
|
return (list
|
||||||
.reduce(function (result, element, index) {
|
.reduce(function (result, element, index) {
|
||||||
var value = target_function(element);
|
var value = target_function(element);
|
||||||
|
|
@ -14466,8 +14476,7 @@ var lib_plankton;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
lib_plankton.log.info("plankton.server.client_connected");
|
lib_plankton.log.info("plankton.server.client_connected");
|
||||||
socket.on("data", (input_chunk_raw, x2, x3, x4, x5) => {
|
socket.on("data", (input_chunk_raw) => {
|
||||||
process.stderr.write(JSON.stringify({ x2, x3, x4, x5 }) + "\n");
|
|
||||||
lib_plankton.log.debug("plankton.server.reading_chunk", {
|
lib_plankton.log.debug("plankton.server.reading_chunk", {
|
||||||
"chunk_raw": ((input_chunk_raw instanceof Buffer)
|
"chunk_raw": ((input_chunk_raw instanceof Buffer)
|
||||||
?
|
?
|
||||||
|
|
@ -16231,6 +16240,11 @@ var lib_plankton;
|
||||||
"name": (data["preferred_username"] ?? null),
|
"name": (data["preferred_username"] ?? null),
|
||||||
"label": (data["name"] ?? null),
|
"label": (data["name"] ?? null),
|
||||||
"email": (data["email"] ?? null),
|
"email": (data["email"] ?? null),
|
||||||
|
"groups": (((data["groups"] === undefined) || (data["groups"] === null))
|
||||||
|
?
|
||||||
|
null
|
||||||
|
:
|
||||||
|
data["groups"].split(",")),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
/*
|
|
||||||
This file is part of »zeitbild«.
|
|
||||||
|
|
||||||
Copyright 2025 'kcf' <fenris@folksprak.org>
|
|
||||||
|
|
||||||
»zeitbild« is free software: you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU Lesser General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
»zeitbild« is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU Lesser General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU Lesser General Public License
|
|
||||||
along with »zeitbild«. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
namespace _zeitbild.value_object.access_level
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function to_string(
|
|
||||||
access_level : _zeitbild.enum_access_level
|
|
||||||
) : string
|
|
||||||
{
|
|
||||||
switch (access_level) {
|
|
||||||
case _zeitbild.enum_access_level.none: {return "none";}
|
|
||||||
case _zeitbild.enum_access_level.view: {return "view";}
|
|
||||||
case _zeitbild.enum_access_level.edit: {return "edit";}
|
|
||||||
case _zeitbild.enum_access_level.admin: {return "admin";}
|
|
||||||
default: {throw (new Error("invalid access level: " + String(access_level)));}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function from_string(
|
|
||||||
access_level_ : string
|
|
||||||
) : _zeitbild.enum_access_level
|
|
||||||
{
|
|
||||||
switch (access_level_) {
|
|
||||||
case "none": {return _zeitbild.enum_access_level.none;}
|
|
||||||
case "view": {return _zeitbild.enum_access_level.view;}
|
|
||||||
case "edit": {return _zeitbild.enum_access_level.edit;}
|
|
||||||
case "admin": {return _zeitbild.enum_access_level.admin;}
|
|
||||||
default: {throw (new Error("invalid encoded access level: " + String(access_level_)));}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function order(
|
|
||||||
x : _zeitbild.enum_access_level,
|
|
||||||
y : _zeitbild.enum_access_level
|
|
||||||
) : boolean
|
|
||||||
{
|
|
||||||
const list : Array<_zeitbild.enum_access_level> = [
|
|
||||||
_zeitbild.enum_access_level.none,
|
|
||||||
_zeitbild.enum_access_level.view,
|
|
||||||
_zeitbild.enum_access_level.edit,
|
|
||||||
_zeitbild.enum_access_level.admin,
|
|
||||||
];
|
|
||||||
return (list.indexOf(x) <= list.indexOf(y));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Reference in a new issue