Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Welcome to our site

Take a moment to join our board

Sign in to follow this  
bauss

Diamond - Full-stack MVC Framework

Recommended Posts

Diamond is a full-stack MVC framework written in D based on vibe.d, making it really powerful.

It's inspired by ASP.NET MVC & Razor.

For more information visit the website.

Website: http://diamondmvc.org/

Thank you.

Edited by bauss
  • Like 2
By Smallxmac,

Thread cleaned 4/1/18

Share this post


Link to post
Share on other sites

Dang this has made some large changes sense the last time I checked it out. I know you were inspired by ASP.NET and with that how would one do policy/role base authorization per controller. Would that be a mandatory action on every request going to a route?

Share this post


Link to post
Share on other sites
On 23/3/2018 at 12:08 AM, Smallxmac said:

Dang this has made some large changes sense the last time I checked it out. I know you were inspired by ASP.NET and with that how would one do policy/role base authorization per controller. Would that be a mandatory action on every request going to a route?

Deleted my post since the information can be found here: http://diamondmvc.org/docs/security/

 

Edited by bauss
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

Quite a large and helpful writeup, Yeah it did answer my question. I was wondering how you did the per endpoint authentication via roles. 

6 hours ago, bauss said:

 

auto guest = addRole("guest")
  .addPermission("/", true, false, false, false) // Guests can view home page
  .addPermission("/user", true, true, false, false) // Guests can view user pages, as well register (POST)
  .addPermission("/login", true, true, false, false) // Guests can view login page, as well login (POST)
  .addPermission("/logout", false, false, false, false); // Guests cannot logout, because they're not logged in

auto user = addRole("user")
  .addPermission("/", true, false, false, false) // Users can view home page
  .addPermission("/user", true, false, true, false) // Users can view user pages, as well update user information (PUT)
  .addPermission("/login", false, false, false, false) // Users cannot view login page or login
  .addPermission("/logout", false, true, false, false); // Users can logout (POST)

 and I believe this answers my question perfectly. I don't have as much time as I would like, but come summer time I will check it out a bit more in detail. I'm sure others would also find this useful as a writeup in general. Thank you

Share this post


Link to post
Share on other sites

Just made a new release: https://github.com/DiamondMVC/Diamond/releases/tag/v2.8.1

Quote

This release contains new functionality and deprecates the usage of "placeHolder", which is replaced by "placeholder."

New functionality includes:

  • Smtp mail support
  • Virtual html elements (Useful for dynamic html generation without being textual. Ex. for backends)
  • File upload/download management
  • Validation such as credit cards, emails, files, types and urls.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.