首页   API文档   注册   登录
Casbin = way to authorization
A place for Casbin developers and users
现在注册
已注册用户请  登录
hsluoyz
Casnode  ›  Summer2020

jCasbin (Hongyu Deng)

  •  
  •  
    hsluoyz · 1年前 · 208 次点击 
    这是一个创建于 469 天前的主题,其中的信息可能已经有所发展或是发生改变。

    Summer2020 Project: https://isrc.iscas.ac.cn/summer2020/#/organisations/casbin (ID: 2008307)

    image

    Student: @tldyl

    Mentors: @hsluoyz

    IM Channel: TBD

    Weekly reports will be appended as replies by the student.

    208 次点击  ∙  1 人收藏  
    Tweet Weibo 忽略主题 
    10 条回复   2020-08-30T14:20:20+08:00
    tldyl
    1
    tldyl1年前

    Week1 (July 1-July 6)

    Weekly summary:

    1. Studied the casbin policy.
    2. Fixed issue #84, Added eval() feature to jCasbin.

    Before coding:

    eval() function should be defined by creating a new class that extends AbstractFunction and loading it into functionMap, just like the previous functions appearing in the demo configuration file. Therefore, I need to learn the framework of Google Aviator. As for the calculation of boolean expressions, I decided to use the BeanShell framework that I am familiar with, which is fully capable of this task and makes this function easier to implement.

    Next week:

    1. Since there is no clear idea for the implementation of authority authentication middleware for Spring, including Spring Cloud, SpringBoot, etc., I decided to write the Adapter for various databases first.
    2. Implement some enforcement api.
    tldyl
    2
    tldyl1年前

    Week2 (July 7-July 14)

    Weekly summary: 1.Studied the casbin policy. 2.Added HibernateAdapter for jCasbin.

    Before coding: I haven't used Hibernate, but after consulting the data, I found that the use of Hibernate is similar to the Mybatis framework that I used, and MybatisAdapter already has relevant implementation, so I refer to the code of MybatisAdapter to write HibernateAdapter.

    Next week: 1.Continue writing adapters that have not yet been implemented.

    tldyl
    3
    tldyl1年前

    Week3 (July 15-July 21)

    Weekly summary:

    1.Studied the casbin policy. 2.Added badges in README.md for hibernate-adapter and mybatis-adapter. 3.Upload hibernate-adapter and mybatis-adapter to maven centural repository.

    Before doing:

    Because I had never done this before, the process was not so smooth. It took me a lot of time, especially to upload the project to maven central repository. It took at least one day for the audit alone, but the task was finally completed.

    Next week:

    1.Preparing for implementation of an interface compatible with Apache Shiro and Spring Security.

    tldyl
    6
    tldyl1年前

    Week4 (July 22-July 28)

    Weekly summary:

    1.Learn how to register custom annotations into the spring container and handle method calls intercepted by interceptors.

    Before coding:

    Before I started on this project, there was actually a project for reference(shiro-jcasbin-spring-boot-starter). I decided to add some new features to this project in it's way(such as @HasRoleForUser). . ) Next week:

    1.Preparing for implementation of an interface compatible with Spring Security, it may take two weeks.

    tldyl
    7
    tldyl1年前

    Week5 (July 29-Aug. 4)

    Weekly summary:

    1.Studied the casbin policy. 2.Fixed issue #41, modify adapter policies before modifying memory

    Before coding:

    First of all, I checked the reference link sent to me by my tutor. In the changed file, I found classes and methods that have not been implemented by jCasbin. So I'm ready to integrated these classes and methods. However, I found that some methods in the reference code return two return values at a time, which is not allowed in Java. These two return values represent the matching effect List (list type), whether it was successfully found (boolean type). If the list is empty, it means it is not found, and the Boolean value is false. According to this, I decided to divide this method into two methods: one returns the list type, and the other calls the method that returns the list type, and returns the Boolean value according to the search result.

    Next week:

    1.Preparing for implementation of an interface compatible with Spring Security.

    tldyl
    11
    tldyl1年前

    Week6-7 (Aug. 5 - Aug. 18)

    Weekly summary:

    1.Studied the casbin policy.

    Due to the busy business in these two weeks, the plan has to be postponed. After that, there will be a longer free time for the planned development.

    Next week:

    1.Preparing for implementation of an interface compatible with Spring Security.

    关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   0 人在线   最高记录 30   ·     选择语言  ·     选择编辑器
    创意工作者们的社区
    World is powered by code
    VERSION: b315f58 · 1ms · UTC 21:11 · PVG 05:11 · LAX 14:11 · JFK 17:11
    ♥ Do have faith in what you're doing.