Skip to content

roles

Column NameTypeCommentDefaultNullRemark
idint UNSIGNEDPrimary Key IDNOAuto Increment
typetinyint UNSIGNEDRole Type3NO1.Administrative: Administrator, Moderator
2.System Settings: Pending Users, Banned Users
3.User Operations: Regular Member, Premium Member
namevarchar(128)Role NameNOMultilingual
icon_file_idbigint UNSIGNEDIcon File IDYESRelated field files->id
icon_file_urlvarchar(255)Icon File URLYES
is_display_nametinyint UNSIGNEDDisplay Text Identifier0NO0.No Display / 1.Display
is_display_icontinyint UNSIGNEDDisplay Icon Identifier0NO0.No Display / 1.Display
nickname_colorchar(7)User Nickname Color ValueYES
permissionsjsonPermission ParametersNO
more_jsonjsonSpare FieldYES
rank_statetinyint UNSIGNEDRank Status1NO1.Not Set
ratingsmallint UNSIGNEDSorting Order9NOAscending order
is_enabledtinyint UNSIGNEDIs Enabled1NO0.Disabled / 1.Enabled
created_attimestampCreate TimeCURRENT_TIMESTAMPNO
updated_attimestampUpdate TimeYES
deleted_attimestampDelete TimeYES

Introduction to Role Types

  • In the User Configuration page of the backend, the Default User Role and Interdiction User Role are not selected and cannot be used as configuration items.

Introduction to Permission Parameters

Permissions parameter field: permissions

json
[
    // Basic settings
    {
        "permKey": "content_view", // View permission
        "permValue": true, // false=No permission; true=Has permission
        "isCustom": false // false=Fixed; true=Custom
    },
    {
        "permKey": "conversation", // Conversation permission
        "permValue": true, // false=No permission; true=Has permission
        "isCustom": false
    },
    {
        "permKey": "content_link_handle", // Link handling
        "permValue": 1, // 1=Do not parse and encrypt domain, 2=Do not parse but display as text, 3=Parse normally
        "isCustom": false
    },
    // Post publishing settings
    {
        "permKey": "post_publish", // Post publishing permission
        "permValue": true, // false=No permission; true=Has permission
        "isCustom": false
    },
    {
        "permKey": "post_review", // Post review required
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "post_email_verify", // Post requirements - Email
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "post_phone_verify", // Post requirements - Phone
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "post_real_name_verify", // Post requirements - Real name verification
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "post_limit_status", // Special rules for post publishing
        "permValue": false, // false=Off; true=On
        "isCustom": false
    },
    {
        "permKey": "post_limit_type", // Rule type, valid when post_limit_status=true
        "permValue": 1, // 1.Specify a time period range, 2.Specify a time period range that repeats daily
        "isCustom": false
    },
    {
        "permKey": "post_limit_period_start", // post_limit_type=1 specific
        "permValue": "2022-06-01 22:30:00", // Start date and time
        "isCustom": false
    },
    {
        "permKey": "post_limit_period_end", // post_limit_type=1 specific
        "permValue": "2022-06-06 08:00:00", // End date and time
        "isCustom": false
    },
    {
        "permKey": "post_limit_cycle_start", // post_limit_type=2 specific
        "permValue": "23:00:00", // Start time
        "isCustom": false
    },
    {
        "permKey": "post_limit_cycle_end", // post_limit_type=2 specific
        "permValue": "08:30:00", // End time
        "isCustom": false
    },
    {
        "permKey": "post_limit_rule", // Restriction rules
        "permValue": 1, // 1.Can publish but needs review, 2.Forbidden to publish
        "isCustom": false
    },
    {
        "permKey": "post_second_interval", // Time interval rule
        "permValue": 60, // 0 for no restriction, number in seconds
        "isCustom": false
    },
    {
        "permKey": "post_daily_count", // 24-hour limit
        "permValue": 0, // 0 for no restriction
        "isCustom": false
    },
    {
        "permKey": "post_draft_count", // Draft count limit
        "permValue": 10, // Maximum of 10 unpublished comment drafts
        "isCustom": false
    },
    // Comment publishing settings
    {
        "permKey": "comment_publish", // Comment publishing permission
        "permValue": true, // false=No permission; true=Has permission
        "isCustom": false
    },
    {
        "permKey": "comment_review", // Comment review required
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "comment_email_verify", // Comment requirements - Email
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "comment_phone_verify", // Comment requirements - Phone
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "comment_real_name_verify", // Comment requirements - Real name verification
        "permValue": false, // false=Not required; true=Required
        "isCustom": false
    },
    {
        "permKey": "comment_limit_status", // Special rules for comment publishing
        "permValue": false, // false=Off; true=On
        "isCustom": false
    },
    {
        "permKey": "comment_limit_type", // Rule type, valid when comment_limit_status=true
        "permValue": 1, // 1.Specify a time period range, 2.Specify a time period range that repeats daily
        "isCustom": false
    },
    {
        "permKey": "comment_limit_period_start", // comment_limit_type=1 specific
        "permValue": "2022-06-01 22:30:00", // Start date and time
        "isCustom": false
    },
    {
        "permKey": "comment_limit_period_end", // comment_limit_type=1 specific
        "permValue": "2022-06-06 08:00:00", // End date and time
        "isCustom": false
    },
    {
        "permKey": "comment_limit_cycle_start", // comment_limit_type=2 specific
        "permValue": "23:00:00", // Start time
        "isCustom": false
    },
    {
        "permKey": "comment_limit_cycle_end", // comment_limit_type=2 specific
        "permValue": "08:30:00", // End time
        "isCustom": false
    },
    {
        "permKey": "comment_limit_rule", // Restriction rules
        "permValue": 1, // 1.Can publish but needs review, 2.Forbidden to publish
        "isCustom": false
    },
    {
        "permKey": "comment_second_interval", // Time interval rule
        "permValue": 60, // 0 for no restriction, number in seconds
        "isCustom": false
    },
    {
        "permKey": "comment_draft_count", // Draft count limit
        "permValue": 10, // Maximum of 10 unpublished comment drafts
        "isCustom": false
    },
    // Upload permission settings
    {
        "permKey": "post_editor_image", // Upload image
        "permValue": true, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "post_editor_image_upload_number", // Number of images to upload
        "permValue": 9, // Number of units
        "isCustom": false
    },
    {
        "permKey": "post_editor_video", // Upload video
        "permValue": true, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "post_editor_video_upload_number", // Number of videos to upload
        "permValue": 1, // Number of units
        "isCustom": false
    },
    {
        "permKey": "post_editor_audio", // Upload audio
        "permValue": true, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "post_editor_audio_upload_number", // Number of audios to upload
        "permValue": 2, // Number of units
        "isCustom": false
    },
    {
        "permKey": "post_editor_document", // Upload document
        "permValue": true, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "post_editor_document_upload_number", // Number of documents to upload
        "permValue": 10, // Number of units
        "isCustom": false
    },
    {
        "permKey": "comment_editor_image", // Upload image
        "permValue": true, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "comment_editor_image_upload_number", // Number of images to upload
        "permValue": 9, // Number of units
        "isCustom": false
    },
    {
        "permKey": "comment_editor_video", // Upload video
        "permValue": false, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "comment_editor_video_upload_number", // Number of videos to upload
        "permValue": 1, // Number of units
        "isCustom": false
    },
    {
        "permKey": "comment_editor_audio", // Upload audio
        "permValue": false, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "comment_editor_audio_upload_number", // Number of audios to upload
        "permValue": 2, // Number of units
        "isCustom": false
    },
    {
        "permKey": "comment_editor_document", // Upload document
        "permValue": false, // false=Cannot upload; true=Can upload
        "isCustom": false
    },
    {
        "permKey": "comment_editor_document_upload_number", // Number of documents to upload
        "permValue": 10, // Number of units
        "isCustom": false
    },
    // Upload configuration values
    {
        "permKey": "image_max_size", // Maximum supported size for uploading images
        "permValue": 5, // Unit MB
        "isCustom": false
    },
    {
        "permKey": "video_max_size", // Maximum supported size for uploading videos
        "permValue": 50, // Unit MB
        "isCustom": false
    },
    {
        "permKey": "video_max_time", // Maximum supported duration for uploaded videos
        "permValue": 60, // Unit seconds
        "isCustom": false
    },
    {
        "permKey": "audio_max_size", // Maximum supported size for uploading audios
        "permValue": 50, // Unit MB
        "isCustom": false
    },
    {
        "permKey": "audio_max_time", // Maximum supported duration for uploaded audios
        "permValue": 60, // Unit seconds
        "isCustom": false
    },
    {
        "permKey": "document_max_size", // Maximum supported size for uploading documents
        "permValue": 10, // Unit MB
        "isCustom": false
    },
    // Interaction settings
    {
        "permKey": "follow_user_max_count", // Maximum number of users to follow
        "permValue": 500,
        "isCustom": false
    },
    {
        "permKey": "block_user_max_count", // Maximum number of users to block
        "permValue": 500,
        "isCustom": false
    },
    {
        "permKey": "download_file_count", // Download files
        "permValue": 10, // Number of allowed downloads within 24 hours
        "isCustom": false
    }
]

Permission parameter defaults (after compression)

json
//General Role
[{"permKey":"content_view","permValue":true,"isCustom":false},{"permKey":"conversation","permValue":true,"isCustom":false},{"permKey":"content_link_handle","permValue":3,"isCustom":false},{"permKey":"post_publish","permValue":true,"isCustom":false},{"permKey":"post_review","permValue":false,"isCustom":false},{"permKey":"post_email_verify","permValue":false,"isCustom":false},{"permKey":"post_phone_verify","permValue":false,"isCustom":false},{"permKey":"post_real_name_verify","permValue":false,"isCustom":false},{"permKey":"post_limit_status","permValue":false,"isCustom":false},{"permKey":"post_limit_type","permValue":1,"isCustom":false},{"permKey":"post_limit_period_start","permValue":"2022-06-01 22:30:00","isCustom":false},{"permKey":"post_limit_period_end","permValue":"2022-06-06 08:00:00","isCustom":false},{"permKey":"post_limit_cycle_start","permValue":"23:00:00","isCustom":false},{"permKey":"post_limit_cycle_end","permValue":"08:30:00","isCustom":false},{"permKey":"post_limit_rule","permValue":1,"isCustom":false},{"permKey":"post_second_interval","permValue":60,"isCustom":false},{"permKey":"post_daily_count","permValue":0,"isCustom":false},{"permKey":"post_limit_rule","permValue":1,"isCustom":false},{"permKey":"post_second_interval","permValue":60,"isCustom":false},{"permKey":"post_draft_count","permValue":10,"isCustom":false},{"permKey":"comment_publish","permValue":true,"isCustom":false},{"permKey":"comment_review","permValue":false,"isCustom":false},{"permKey":"comment_email_verify","permValue":false,"isCustom":false},{"permKey":"comment_phone_verify","permValue":false,"isCustom":false},{"permKey":"comment_real_name_verify","permValue":false,"isCustom":false},{"permKey":"comment_limit_status","permValue":false,"isCustom":false},{"permKey":"comment_limit_type","permValue":1,"isCustom":false},{"permKey":"comment_limit_period_start","permValue":"2022-06-01 22:30:00","isCustom":false},{"permKey":"comment_limit_period_end","permValue":"2022-06-06 08:00:00","isCustom":false},{"permKey":"comment_limit_cycle_start","permValue":"23:00:00","isCustom":false},{"permKey":"comment_limit_cycle_end","permValue":"08:30:00","isCustom":false},{"permKey":"comment_limit_rule","permValue":1,"isCustom":false},{"permKey":"comment_second_interval","permValue":60,"isCustom":false},{"permKey":"comment_daily_count","permValue":0,"isCustom":false},{"permKey":"comment_draft_count","permValue":10,"isCustom":false},{"permKey":"post_editor_image","permValue":true,"isCustom":false},{"permKey":"post_editor_image_upload_number","permValue":9,"isCustom":false},{"permKey":"post_editor_video","permValue":true,"isCustom":false},{"permKey":"post_editor_video_upload_number","permValue":1,"isCustom":false},{"permKey":"post_editor_audio","permValue":true,"isCustom":false},{"permKey":"post_editor_audio_upload_number","permValue":2,"isCustom":false},{"permKey":"post_editor_document","permValue":true,"isCustom":false},{"permKey":"post_editor_document_upload_number","permValue":10,"isCustom":false},{"permKey":"comment_editor_image","permValue":true,"isCustom":false},{"permKey":"comment_editor_image_upload_number","permValue":9,"isCustom":false},{"permKey":"comment_editor_video","permValue":false,"isCustom":false},{"permKey":"comment_editor_video_upload_number","permValue":1,"isCustom":false},{"permKey":"comment_editor_audio","permValue":false,"isCustom":false},{"permKey":"comment_editor_audio_upload_number","permValue":2,"isCustom":false},{"permKey":"comment_editor_document","permValue":false,"isCustom":false},{"permKey":"comment_editor_document_upload_number","permValue":10,"isCustom":false},{"permKey":"image_max_size","permValue":5,"isCustom":false},{"permKey":"video_max_size","permValue":50,"isCustom":false},{"permKey":"video_max_time","permValue":60,"isCustom":false},{"permKey":"audio_max_size","permValue":50,"isCustom":false},{"permKey":"audio_max_time","permValue":60,"isCustom":false},{"permKey":"document_max_size","permValue":10,"isCustom":false},{"permKey":"follow_user_max_count","permValue":500,"isCustom":false},{"permKey":"block_user_max_count","permValue":500,"isCustom":false},{"permKey":"download_file_count","permValue":10,"isCustom":false}]

//Interdiction or Pending Review roles
[{"permKey":"content_view","permValue":true,"isCustom":false},{"permKey":"conversation","permValue":false,"isCustom":false},{"permKey":"content_link_handle","permValue":1,"isCustom":false},{"permKey":"post_publish","permValue":false,"isCustom":false},{"permKey":"post_review","permValue":false,"isCustom":false},{"permKey":"post_email_verify","permValue":false,"isCustom":false},{"permKey":"post_phone_verify","permValue":false,"isCustom":false},{"permKey":"post_real_name_verify","permValue":false,"isCustom":false},{"permKey":"post_limit_status","permValue":false,"isCustom":false},{"permKey":"post_limit_type","permValue":1,"isCustom":false},{"permKey":"post_limit_period_start","permValue":"2022-06-01 22:30:00","isCustom":false},{"permKey":"post_limit_period_end","permValue":"2022-06-06 08:00:00","isCustom":false},{"permKey":"post_limit_cycle_start","permValue":"23:00:00","isCustom":false},{"permKey":"post_limit_cycle_end","permValue":"08:30:00","isCustom":false},{"permKey":"post_limit_rule","permValue":1,"isCustom":false},{"permKey":"post_second_interval","permValue":60,"isCustom":false},{"permKey":"post_limit_rule","permValue":1,"isCustom":false},{"permKey":"post_second_interval","permValue":60,"isCustom":false},{"permKey":"post_daily_count","permValue":1,"isCustom":false},{"permKey":"post_draft_count","permValue":10,"isCustom":false},{"permKey":"comment_publish","permValue":false,"isCustom":false},{"permKey":"comment_review","permValue":false,"isCustom":false},{"permKey":"comment_email_verify","permValue":false,"isCustom":false},{"permKey":"comment_phone_verify","permValue":false,"isCustom":false},{"permKey":"comment_real_name_verify","permValue":false,"isCustom":false},{"permKey":"comment_limit_status","permValue":false,"isCustom":false},{"permKey":"comment_limit_type","permValue":1,"isCustom":false},{"permKey":"comment_limit_period_start","permValue":"2022-06-01 22:30:00","isCustom":false},{"permKey":"comment_limit_period_end","permValue":"2022-06-06 08:00:00","isCustom":false},{"permKey":"comment_limit_cycle_start","permValue":"23:00:00","isCustom":false},{"permKey":"comment_limit_cycle_end","permValue":"08:30:00","isCustom":false},{"permKey":"comment_limit_rule","permValue":1,"isCustom":false},{"permKey":"comment_second_interval","permValue":60,"isCustom":false},{"permKey":"comment_daily_count","permValue":1,"isCustom":false},{"permKey":"comment_draft_count","permValue":10,"isCustom":false},{"permKey":"post_editor_image","permValue":true,"isCustom":false},{"permKey":"post_editor_image_upload_number","permValue":9,"isCustom":false},{"permKey":"post_editor_video","permValue":true,"isCustom":false},{"permKey":"post_editor_video_upload_number","permValue":1,"isCustom":false},{"permKey":"post_editor_audio","permValue":true,"isCustom":false},{"permKey":"post_editor_audio_upload_number","permValue":2,"isCustom":false},{"permKey":"post_editor_document","permValue":true,"isCustom":false},{"permKey":"post_editor_document_upload_number","permValue":10,"isCustom":false},{"permKey":"comment_editor_image","permValue":true,"isCustom":false},{"permKey":"comment_editor_image_upload_number","permValue":9,"isCustom":false},{"permKey":"comment_editor_video","permValue":false,"isCustom":false},{"permKey":"comment_editor_video_upload_number","permValue":1,"isCustom":false},{"permKey":"comment_editor_audio","permValue":false,"isCustom":false},{"permKey":"comment_editor_audio_upload_number","permValue":2,"isCustom":false},{"permKey":"comment_editor_document","permValue":false,"isCustom":false},{"permKey":"comment_editor_document_upload_number","permValue":10,"isCustom":false},{"permKey":"image_max_size","permValue":5,"isCustom":false},{"permKey":"video_max_size","permValue":50,"isCustom":false},{"permKey":"video_max_time","permValue":60,"isCustom":false},{"permKey":"audio_max_size","permValue":50,"isCustom":false},{"permKey":"audio_max_time","permValue":60,"isCustom":false},{"permKey":"document_max_size","permValue":10,"isCustom":false},{"permKey":"follow_user_max_count","permValue":500,"isCustom":false},{"permKey":"block_user_max_count","permValue":500,"isCustom":false},{"permKey":"download_file_count","permValue":0,"isCustom":false}]

Released under the Apache-2.0 License