Giter Club home page Giter Club logo

pex-admin's Introduction

PEXAdmin

PEXAdmin allow you to edit your PermissionsEX data from a fancy web-interface.

Features

  • Don't get bored anymore with pex permissions editing commands!
  • Global overview of all permissions + preview chat prefix / suffix set
  • Edit player and groups options (default, build, ...)
  • Easily list all registered groups / players set in PEX
  • Add / Copy / Remove groups
  • Add / Copy / Remove players
  • Protected access (letting you can configure write/readonly access)

Live demonstration

https://oxygen-framework.net/demos/pexadmin

Login: demo

Password: demo

NOTE: You only have a readonly access in live demo.

Server Requirements:

Installation / Configuration

Webserver configuration

PEXAdmin comes in 2 flavors:

  • If you have access to apache server's configuration, you must setup your virtualhost to let the / location being mapped into the public folder (e.g. if all settings are ok, you won't be able to access Application folder or any of it's contents from your browser). Here is a Virtualhost directive to use for example:
<VirtualHost *:80>
    DocumentRoot /path/where/you/put/pexadmin/public
    ServerName pexadmin.example.com
</VirtualHost>
  • If you cannot modify the server configuration and only access to the folder served as root or want to install PEXadmin in a subfolder, you can download the 'subfolder' version of PEXAdmin or create it by running the scripts under the subfolder-flavor folder.

Database configuration

As the PEXAdmin config files are all in JSON format, watch out the syntax errors!

You can use tools like JSONLint to check the syntax before editing the actual file.

You have to set your database access to let PEXAdmin handle the permissions. Open the file Application/Config/db.json, change the host/dbname and credentials according to your database' ones.

{
    "default": {
        "dsn": "mysql:host=localhost;dbname=minecraft;charset=utf8",
        "user": "test",
        "password": "password"
    }
}

In this sample file, the database is hosted at localhost and named minecraft, use the same as your PEX's config.yml.

If you set tables aliases in PermissionsEX config.yml, you have to tell the new names to PEXAdmin by editing Application/Config/pex.json. In the table_aliases section you'll find a similar syntax to the config.yml to let you tell the aliases (at left (key) you have the original table name and at right (value) you can change the name according to your PermissionEX aliases configuration).

Do not edit the rest of the files unless you know what you are doing!

Users access configuration

To allow which users can connect to PEXAdmin, you have to edit the Application/Config/users.json.

{
	"demo":
	{
		"password": "89e495e7941cf9e40e6980d14a16bf023ccd4c91",
		"role": "read"
	},
	"admin":
	{
		"password": "d033e22ae348aeb5660fc2140aec35850c4da997",
		"role": "write"
	},
	"admin2":
	{
		"password": "$2y$10$iqiefC9ER6Ifw/jnOEs8ser1ETQCZ0KDCs/ylVFPnGK.OA749WDqa",
		"role": "write",
		"hashType": "bcrypt"
	}
}

Each object is a user, the key is the user's login and data is user's password and role.

In the sample config shown above, there are 3 users (demo , admin and admin2) and their passwords are respectively 'demo', 'admin' (hashed with SHA1 algorithm). and 'admin2' (hashed with bcrypt algorithm)

The usernames keys must be in lowercase !

Roles:

  • read can see all permission / players / groups but cannot edit them
    • it can be used for people that need to know permissions nodes
  • write can edit all permission / players / groups

hashType option specify which hash algorithm was used to hash the password Here's the accepted values:

  • 'sha1' (default if not provided): using the sha1 algorithm
  • 'bcrypt': more robust
  • 'clear': don't use any hash algorithm, meaning password is stored as-is (This value should not be used in production and was kept for debugging / testing purposes only!)

To get the SHA1 hash from your password, you can use one of the the online sha1 script, or simply run echo sha1('YOUR PASSWORD'); in PHP. To get the bcrypt hash from your password, you can also use one of the the online hash scripts, or simply run echo password_hash("YOUR PASSWORD", PASSWORD_DEFAULT); in PHP.

pex-admin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tominous

pex-admin's Issues

Internal Error with PHP 7.2

I only have PHP 7.2 available on the server I'm willing to use.
Both pex-admin 1.5 and 1.3 give me the PEXAdmin Logo with a "Internal error occured" message, even before requesting credentials.
I had first configured the database and users but then tried both versions without any modifications.

My PHP knowledge is basic, I am not familiar with debugging methods for your code.

Thanks in advance if you're willing to revive this project :)

lowercased usernames

Why do you say that usernames should be lowercased?

You can remove that strtolower function from Authentication controller:
$username = strtolower($paramLogin);

Make it working with PEX 2

At the moment, PEXAdmin is bound to PEX 1.23.4 (last stable version as of writting)

Maybe the backed is already compatible (backward way)? Maybe introducing new features?

Nginx

How would one use this software with nginx?

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.