ikpanel
  • Getting started
  • Introduction
    • Configuration
      • Policy
      • Navigation menu
      • Dashboard
    • Backup & Restore
      • SCP
      • Dropbox
    • Users
    • Roles
  • Modules
    • Blog
    • Calendar
    • Gallery
    • Newsletter
    • E-Commerce
  • Extend
    • Module Development
Powered by GitBook
On this page
  • # Database structure
  • ## Token table
  • ## Token group

Was this helpful?

  1. Introduction
  2. Configuration

Policy

Ikpanel handles policy within tokens. You're free to customize or add new tokens by editing database.

# Database structure

Tokens are handles in database with the following tables:

  • token

  • token_group

## Token table

This table contains all the tokens. If you wanna add a new policy you've to insert now token here.

id - This must be an uppercase string

name - Define tokens description. This definitions will appear on policy view.

id_group - Foreign key with "token_group" table. It will define a token group.

id_type - Foreign key with "token_view" table. It will define a token type.

Example of migration:

DB:beginTransaction();

try {
	Token::insert([
		[
			"id"       => "ID",
			"name"     => "Name",
			"id_group" => "ID_GROUP",
			"id_type"  => "ID_TYPE"
		]
	]);
} catch (QueryException $e) {
	DB::rollBack();
	throw $e;
} // try

## Token group

Table that define all token group.

id - This must be an uppercase string.

group_name - Used to define a group name.

description - Used to define a group description.

icons - Used to define a group icon

Example of migration:

DB::beginTransaction();
		
try {
	TokenGroup::insert([
		[
			"id"          => "ID",
			"group_name"  => "name",
			"description" => 'description'
		]
	]);
} catch (QueryException $e) {
	DB::rollBack();
	throw $e;
} // try

Every HTTP request is filtered within a middleware that checks if the current user has the proper authorization.

PreviousConfigurationNextNavigation menu

Last updated 6 years ago

Was this helpful?