Giter Club home page Giter Club logo

Comments (3)

g-plane avatar g-plane commented on August 16, 2024 1

这种需求不多见啊,不过你可以通过编写插件来实现。

from blessing-skin-server.

g-plane avatar g-plane commented on August 16, 2024

你可以像这样编写插件,下面是 bootstrap.php 的源码(随手写的,不保证正确性):

return function () {
    $user = app('users')->get(session('uid'));

    if (request()->is('skinlib/*') && ! $user->isAdmin()) {
        return abort(403, trans('auth.check.admin'));
    }
};

具体如何制作一个插件,可移步 插件开发文档

from blessing-skin-server.

g-plane avatar g-plane commented on August 16, 2024

不考虑实现这个特性(除非真的有较大的呼声)。我关闭 issue 了,如果有问题可以继续讨论。

from blessing-skin-server.

Related Issues (20)

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.