Giter Club home page Giter Club logo

permissioncore's Introduction

PermissionCore 权限组核心

一个适用于Levilamina的非官方权限组前置, 旨在为Levilamina原生插件提供一个权限组轮子

功能

本插件对外提供的 API,主要分为以下三大块

  • 权限核心
    每个插件创建一个自己的核心,提供权限核心 API

  • 权限管理
    每个插件创建的核心注册到管理进行全局管理,开发者可以从这里获取已注册的权限核心

  • 权限注册
    插件需要把权限注册到这个 API 中,这可以为将来的 Command、GUI 提供查询支持

安装使用

用户

使用 Lip 一键安装

lip install github.com/engsr6982/PermissionCore

安装插件后启动服务器,控制台输入? permc查看命令列表

开发者

以下是按照传统的 submodule 形式使用 PermissionCore
如果需要 xmake 来管理 PermissionCore,请参考测试仓库的xmake.lua

  • Step1:

Release下载SDK,解压到你的项目仓库根目录的SDK_PermissonCore

project:
├─SDK_PermissionCore
│    │  include_all.h
│    │
│    ├─Lib
│    │      PermissionCore.lib
│    │
│    └─PermissionCore
│        ├─PermissionCore
│        │      PermissionCore.h
│        │
│        └─Registers
│                Registers.h
│
├─src
...省略其他内容
  • Step2:

打开xmake.lua,在target后面加上

target("Levilamina-Plugin-Template")
    add_includedirs(
        "SDK_PermissonCore", -- 让xmake识别到头文件
        "src"
    )
    add_links(
        "SDK_PermissonCore/Lib/PermissionCore" -- 为编译链接库
    )
    -- 省略其他内容

permissioncore's People

Contributors

engsr6982 avatar

Stargazers

xlang1135 avatar

Watchers

 avatar

permissioncore's Issues

[Feature]: 支持Web操作

Is your feature request related to a problem? Please describe.

支持Web操作

Describe the solution you'd like

dll启动一个HttpServer,然后提供web页面操作服务器权限组

页面考虑采用React + Antd

[Bug]: Release编译模式下出现nullptr

Describe the bug

测试库 PermissionCoreTest

根据测试样例和堆栈信息,得知18-22行
image

assert(core != nullptr);

并未抛出错误,而是下文的35行
调用hasGroup方法抛出this is nullptr错误

To Reproduce

测试库 PermissionCoreTest

测试库和当前前置任意一个使用Release编译

Expected behavior

正常获取到PermissionCore实例,而不是nullptr

Screenshots

image
9f070ca184ca565ab32437e2587a95cc

Platform

win11

BDS Version

1.20.72-1.662+ff4a891

LeviLamina Version

LeviLamina-0.10.5+d9516c73d

Version

0.5.0

Additional context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.