Coder Social home page Coder Social logo

如何配置多管理员 about alist HOT 6 OPEN

charliez0 avatar charliez0 commented on June 26, 2024
如何配置多管理员

from alist.

Comments (6)

github-actions avatar github-actions commented on June 26, 2024 2

See

  1. 56% #5511

from alist.

welcome avatar welcome commented on June 26, 2024

Thanks for opening your first issue here! Be sure to follow the issue template!

from alist.

Seele0oO avatar Seele0oO commented on June 26, 2024

尝试了一下,貌似不行。
使用api设置,提示不能创建管理员用户。
尝试修改sqlite文件,也不行。
可能设计上就不让多管理员。

from alist.

huolanyun avatar huolanyun commented on June 26, 2024

新建用户,权限全给,不就是管理员?

from alist.

anwen-anyi avatar anwen-anyi commented on June 26, 2024

没记错的话应该只能通过修改数据库来操作

image

from alist.

Seele0oO avatar Seele0oO commented on June 26, 2024
CREATE TRIGGER change_role_if_zero
AFTER INSERT ON x_users
FOR EACH ROW
WHEN NEW.role = 0
BEGIN
    UPDATE x_users
    SET role = 2
    WHERE id = NEW.id;
END;

这样就能保证每个新用户都是管理员了。

可惜alist默认并不带sqlite3软件,不能直接在docker启动顺便执行一下。

apk update
apk add sqlite
然后再用sqlite连接数据库就好了。
上面的触发器应该只在新建用户的时候触发。

from alist.

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.