deep-foundation / deep-foundation/deeplinks

Authorization rights do not work

Open
#174 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

I create authorization rights, but when I try to authorize as a user it authorizes as a guest.
You can test it in this package @l4legenda/passport-username-password
```javascript
const insertRule = async (options) => {
const { data: [{ id: ruleId }] } = await deep.insert({
type_id: await deep.id('@deep-foundation/core', 'Rule'),
out: { data: [
{
type_id: await deep.id('@deep-foundation/core', 'RuleSubject'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
out: { data: options.subject },
} }
},
{
type_id: await deep.id('@deep-foundation/core', 'RuleObject'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
out: { data: options.object },
} }
},
{
type_id: await deep.id('@deep-foundation/core', 'RuleAction'),
to: { data: {
type_id: await deep.id('@deep-foundation/core', 'Selector'),
out: { data: options.action },
} }
},
] },
});
};

await insertRule({
subject: {
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
to_id: currentLinkId,
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'joinTree'),
} },
},
object: [
{
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
to_id: globalUserId,
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'containTree'),
} },
}
],
action: [
{
type_id: await deep.id('@deep-foundation/core', 'SelectorInclude'),
to_id: await deep.id('@deep-foundation/core', 'AllowLogin'),
out: { data: {
type_id: await deep.id('@deep-foundation/core', 'SelectorTree'),
to_id: await deep.id('@deep-foundation/core', 'containTree'),
} },
},
],
});
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.