上QQ阅读APP看书,第一时间看更新
There's more...
What we did here is called programmatic security, that is, we defined the security rules and roles through our code (the program). There's another approach called declarative security, where you declare the rules and roles through application and server configurations.
One good step up for this recipe is to evolve the roles management to a source outside the application, such as a database or a service.