menu
Logo
  • Why azing?
  • Blog
  • Help
ENarrow_drop_down
  • DE
  • EN
Suche in Checklisten
search
azing Logo ENarrow_drop_down
  • DE
  • EN
  • Why azing?
  • Help
2sxc
drive_folder_upload
  • homeChecklist Templates
  • south

folder_sharedOqtane

  • homeChecklist Templates
  • south

folder_sharedOqtane

Folders and checklists

  • check_circleInstall 2sxc in Oqtane
  • check_circleInstall 2sxc module in Oqtane Framework source code with Visual Studio 2022
  • check_circleInstall Razor.Compiler.Dependencies.zip
  • check_circleOqtane System Update
  • check_circlePackage ToSic.Sxc.N.N.N.nupkg
  • infoSecurity Attributes
  • check_circleUpgrade 2sxc module in Oqtane
  • check_circleWarning: The "refs" folder is missing. Please ensure that Razor.Compiler.Dependencies.zip is unzipped as explained in the installation recipe

Parts (0) expand_more

These are small document-parts which are used in other documents. They are not a starting point for any real activity. Because of this, they will be listed further down and the search will not list them unless requested. 

Policy-based authorization in Oqtane

In Startup.cs each Policy define list of permission requiremants. Each PremissionRequiremant is consists of EntityName and PermissionName.

In Oqtane database we have all Permissions.

Each user identity get its clams thast contain user Permissions 

PermissionHandler is Oqtane implementation of AuthorizationHandler<TRequirement> : IAuthorizationHandler. In method HandleRequirementAsync is decided do user have required permissions or not based on httpContext, AuthorizationHandlerContext and permission requiremants.

For Oqtane:

// permission is scoped based on EntityId which must be passed as a querystring parameter

Options

[Authorize(Policy = PolicyNames.ViewPage)]
[Authorize(Policy = PolicyNames.EditPage)]
[Authorize(Policy = PolicyNames.ViewModule)]
[Authorize(Policy = PolicyNames.EditModule)]
[Authorize(Policy = PolicyNames.ViewFolder)]
[Authorize(Policy = PolicyNames.EditFolder)]
[Authorize(Policy = PolicyNames.ListFolder)]

Notes

Recomended to secure Controller, because it dynamic.

Multiple polices are allowed.

[Authorize(Policy = PolicyNames.ListFolder, PolicyNames.ViewFolder)]

Also possible to secure razore page.

More info

https://docs.microsoft.com/en-us/aspnet/core/security/authorization/policies?view=aspnetcore-5.0

 

Role-based authorization in Oqtane

Options

[Authorize(Roles = RoleNames.Everyone)]
[Authorize(Roles = RoleNames.Host)]
[Authorize(Roles = RoleNames.Admin)]
[Authorize(Roles = RoleNames.Registered)]

Notes

Not recomented, because it is not all dynamic.

Multiple roles are allowed.

[Authorize(Roles = RoleNames.Admin,RoleNames.Registered)]

Can combine with polices.

[Authorize(Roles = RoleNames.Admin,Policy = PolicyNames.EditPage)]

More info

https://docs.microsoft.com/en-us/aspnet/core/security/authorization/roles?view=aspnetcore-5.0

 

 

 

Logo
Legal | Content Copyright CC-BY 4.0
bug_reportReport Bug
  • info
  • Links
  • Permissions
code Share
code
URL copied to clipboard.
Embed Checklist close
Copy Copy
Content Copyright

CC-BY 4.0

Translations

None

2sxc - Content Management for DNN & Oqtane Logo

2sxc - Content Management for DNN & Oqtane

QR-Code
azing.org/2sxc/r/J_A3sfLx
View & Use

Public (can be used by everybody)

Edit & Admin

Default (all members can edit)

This catalog has a simple permission model, where all members have the same permissions. For advanced permissions, upgrade to Enterprise.

Here you can see how this document is used and linked by other documents

Used in (0)

Others referencing this

Uses these (0)

Documents linked from this document

How it Behaves

How this document is categorized changes how it behaves.

This is a main document, it is listed normally and appears in search result.

Type

This is an Information. Lists are treated as information and not as checkboxes'

Get something to say?

Comment to start a discussion or make a note
send

please log on to chat

close

Durchsuche ganz Azing