MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / applyGroups

Function applyGroups

apps/testbed/src/App.tsx:40–48  ·  view source on GitHub ↗
(u: User)

Source from the content-addressed store, hash-verified

38 }, []);
39
40 function applyGroups(u: User) {
41 op.setGroups(u.groupIds);
42 for (const id of u.groupIds) {
43 const meta = PRESET_GROUPS.find((g) => g.id === id);
44 if (meta) {
45 op.upsertGroup({ id, ...meta });
46 }
47 }
48 }
49
50 function login(u: User) {
51 localStorage.setItem('op_testbed_user', JSON.stringify(u));

Callers 2

AppFunction · 0.85
loginFunction · 0.85

Calls 2

setGroupsMethod · 0.45
upsertGroupMethod · 0.45

Tested by

no test coverage detected