承接 processton-io/processton-user 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

processton-io/processton-user

最新稳定版本:1.1.11

Composer 安装命令:

composer require processton-io/processton-user

包简介

Processton Interactions to manage users

README 文档

README

Latest Version on Packagist Total Downloads GitHub Actions

This is a module for processton-setup provides user management feature. This module provides following functionalities to the processton setup.

  • Add User/Role
  • Users/Roles Listing
  • Allow/Block User
  • Role Permissions

Installation

You can install the package via composer:

composer require processton-io/processton-user

Usage

After installation publish configurations and resolvers.

php artisan vendor:publish

Run migrations

php artisan migrate

Extend you user model using Trait

use Processton\ProcesstonUser\Models\Trait\ProcesstonUser;
class User {
    use ProcesstonUser;
}

above script will add three functions to your User model

$request->user()->role;
//Return role assigned to the user

$request->user()->permissions;
//Return array of permissions assign to user role.

$request->user()->havePermission($permission, $createNew = true);
//Check does user have specified permission or not. pass permission key as argument. If second argument is true checked permission will automatically get mapped from configuration file and database record will be created.

This package follow standard Processton App module functionality. module config file have

  • base_url (users)
  • menu_items
    • Users
    • Roles
  • interactions
    • Users
    • Roles
  • charts
    • total_users
    • new_users
    • total_sessions ! not working yet
    • pending_validation
    • avg_sessions_duration !not working yet
  • resolvers
    • user-invitation
    • user-block
    • user-un-block
    • reset-password-email
  • permission_mappings
    • admin.setup.users
    • admin.setup.users.block
    • admin.setup.users.unblock
    • admin.setup.users.resetpassword
    • admin.setup.roles
    • admin.setup.roles.edit
    • admin.setup.roles.permissions

You can publish and alter them as per your needs.

This module uses three Primary models

  • User
  • Role
  • Permission
Remember First Role always have all permissions.

Testing

testing is not available for this module yet.

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please use issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 21
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-07-09