System Reference

In this section, we will cover the features of each following systems in-depth listed below:

Dashboard Menu

Dashboard Menu is a system in uAdmin that is used to add, modify, and delete the elements of a model. Making it look good and customizing it to meet your customers requirements is important to the success of your app.

_images/dashboardmenu.png

Here are the following fields in this system:

  • Dashboard Menu - The name of the model

  • URL - The path where the model can be accessed

  • Tool Tip - A message that appears when a cursor is positioned over an icon, image, hyperlink, or other element in a graphical user interface

  • Icon - A picture, image, or other representation to display in the dashboard

  • Cat - Used to set a highlight label for a model

  • Hidden - A feature to make the model invisible in the dashboard

Let’s create a new dashboard menu called “Expressions” with a URL of “expression”.

_images/expressionaddsystem.png

Once you are done, go back to your dashboard to see if the Expression model was created.

_images/expressionaddsystemoutput.png

Nice! Now let’s go back to the dashboard menu. Upload the image file in the Icon field. If you don’t have any pictures or icons in your computer, I would recommend you to go over flaticon.com, but you can browse anywhere online. Once you search for an icon, download the PNG version and choose the size 128 pixels.

_images/expressionicon.png

Once you are done, go back to your dashboard to see if your image file was uploaded.

_images/expressioniconoutput.png

That’s cool man! Now let’s make it more realistic. Go back to the dashboard menu again. This time let’s input the value of the Tool Tip to “Hello everyone! Welcome to uAdmin, the Golang Web Framework.”.

_images/expressiontooltip.png

Once you are done, go back to your dashboard to see if the Tool Tip is functional.

_images/expressiontooltipoutput.png

Great! Now let’s go back to the dashboard menu again and set the value of the Cat to “Meow!”.

_images/expressioncat.png

Once you are done, go back to your dashboard to see if the Cat is functional.

_images/expressioncatoutput.png

Well done! Okay let’s go back to the dashboard menu. This time toggle the Hidden field of the Expression model to true.

_images/expressionhidden.png

Once you are done, go back to your dashboard to see if the Expression model is hidden.

_images/uadmindashboard.png

And it’s gone. Now go to the dashboard menu. Finally, delete the Expression model in the list.

_images/expressiondelete.png

Well done! Now you know how to configure your dashboard menu by adding, updating, customizing and deleting a model.

Group Permission

Group Permission sets the permission of a user group handled by an administrator.

_images/grouppermissioncreated.png

Here are the following fields in this system:

  • Group Permission - Returns the ID number of itself

  • Dashboard Menu - Fetches the name of the model

  • User Group - Fetches the name of the group

  • Read - Sets the Read access to the user

  • Add - Sets the Add access to the user

  • Edit - Sets the Edit access to the user

  • Delete - Sets the Delete access to the user

First of all, make it sure that your existing account is not an Admin (example below is Even Demata) and it is part of the User Group (example below is Front Desk).

_images/adminusergrouphighlighted.png

Click the Front Desk highlighted below.

_images/frontdeskhighlighted.png

Go to the Group Permission tab. Afterwards, click Add New Group Permission button at the right side.

_images/addnewgrouppermission.png

Set the Dashboard Menu to “Todos” model, User linked to “Even Demata”, and activate the “Read” only. It means Front Desk User Group has restricted access to adding, editing and deleting a record in the Todos model.

_images/grouppermissionadd.png

Result

_images/grouppermissionaddoutput.png

Log out your System Admin account. This time login your username and password using the user account that has group permission. Now click on TODOS model.

_images/userpermissiondashboard.png

As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

_images/useraddeditdeleterestricted.png

To remove these restrictions, login your System Admin account, go to Group Permission and activate “Add”, “Edit”, and “Delete” access to Front Desk group.

_images/groupaddeditdelete.png

Login your Even Demata account and see what happens.

_images/useraccessadddelete.png

Let’s open the “Read a book” record to see if the user can have access to edit.

_images/useraccessedit.png

Nice! You have full access to everything in the TODOS model. What if the user group has no access to “Read” but can add, edit, or delete a record? Login your System account and remove “Read” access to Front Desk.

_images/groupnoaccessread.png

Login your Even Demata account and see what happens.

_images/dashboardmenuempty.png

TODOS model does not show up in the dashboard. Even if you remove access to “Add”, “Edit” and “Delete” to Front Desk group, it will display the same output.

Login your System Admin account. Finally, delete the Group Permission in the Front Desk User Group.

_images/grouppermissiondelete.png

Well done! Now you know how to set the group permission to the user group, changing the access in the model and deleting the group permission.

Export to Excel

Export is one of the features of uAdmin that can replicate the data inside the model to the Excel file.

First of all, open any models in the dashboard (e.g. TODOS).

_images/todoshighlightedlog.png

In this example, create at least 10 records in the Todo model. Once you are done, click Export button located at the bottom right corner of the screen.

_images/exporttoexcel.png

You will get the encrypted filename in the Excel file for security purposes.

_images/encryptedfilenameexcel.png

Open that file. The data that you have created in the uAdmin model will be replicated to the Excel file.

_images/todosexceldata.png

Well done! Now you know how to export a model to Excel file in uAdmin.

Language

Language is a system in uAdmin that is used to add, modify, and delete the elements of a language. There are a total of 184 languages.

LIST OF AVAILABLE LANGUAGES

English Name

Name

Tag

Abkhaz

аҧсуа бызшәа, аҧсшәа

ab

Afar

Afaraf

aa

Afrikaans

Afrikaans

af

Akan

Akan

ak

Albanian

Shqip

sq

Arabic

العربية

ar

Aragonese

aragonés

an

Armenian

Հայերեն

hy

Assamese

অসমীয়া

as

Avaric

авар мацӀ, магӀарул мацӀ

av

Avestan

avesta

ae

Aymara

aymar aru

ay

Azerbaijani

azərbaycan dili

az

Bambara

bamanankan

bm

Bashkir

башҡорт теле

ba

Basque

euskara, euskera

eu

Belarusian

беларуская мова

be

Bengali, Bangla

বাংলা

bn

Bihari

भोजपुरी

bh

Bislama

Bislama

bi

Bosnian

bosanski jezik

bs

Breton

brezhoneg

br

Bulgarian

български език

bg

Burmese

ဗမာစာ

my

Catalan

català

ca

Chamorro

Chamoru

ch

Chechen

нохчийн мотт

ce

Chichewa, Chewa, Nyanja

chiCheŵa, chinyanja

ny

Chinese

中文 (Zhōngwén), 汉语, 漢語

zh

Chuvash

чӑваш чӗлхи

cv

Cornish

Kernewek

kw

Corsican

corsu, lingua corsa

co

Cree

ᓀᐦᐃᔭᐍᐏᐣ

cr

Croatian

hrvatski jezik

hr

Czech

čeština, český jazyk

cs

Danish

dansk

da

Divehi, Dhivehi, Maldivian

ދިވެހި

dv

Dutch

Nederlands, Vlaams

nl

Dzongkha

རྫོང་ཁ

dz

English

English

en

Esperanto

Esperanto

eo

Estonian

eesti, eesti keel

et

Ewe

Eʋegbe

ee

Faroese

føroyskt

fo

Fijian

vosa Vakaviti

fj

Filipino

Filipino

fl

Finnish

suomi, suomen kieli

fi

French

français, langue française

fr

Fula, Fulah, Pulaar, Pular

Fulfulde, Pulaar, Pular

ff

Galician

galego

gl

Ganda

Luganda

lg

Georgian

ქართული

ka

German

Deutsch

de

Greek (modern)

ελληνικά

el

Guaraní

Avañe’ẽ

gn

Gujarati

ગુજરાતી

gu

Haitian, Haitian Creole

Kreyòl ayisyen

ht

Hausa

(Hausa) هَوُسَ

ha

Hebrew (modern)

עברית

he

Herero

Otjiherero

hz

Hindi

हिन्दी, हिंदी

hi

Hiri Motu

Hiri Motu

ho

Hungarian

magyar

hu

Icelandic

Íslenska

is

Ido

Ido

io

Igbo

Asụsụ Igbo

ig

Indonesian

Bahasa Indonesia

id

Interlingua

Interlingua

ia

Interlingue

Originally called Occidental; then Interlingue after WWII

ie

Inuktitut

ᐃᓄᒃᑎᑐᑦ

iu

Inupiaq

Iñupiaq, Iñupiatun

ik

Irish

Gaeilge

ga

Italian

Italiano

it

Japanese

日本語 (にほんご)

ja

Javanese

ꦧꦱꦗꦮ, Basa Jawa

jv

Kalaallisut, Greenlandic

kalaallisut, kalaallit oqaasii

kl

Kannada

ಕನ್ನಡ

kn

Kanuri

Kanuri

kr

Kashmiri

कश्मीरी, كشميري‎

ks

Kazakh

қазақ тілі

kk

Khmer

ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ

km

Kikuyu, Gikuyu

Gĩkũyũ

ki

Kinyarwanda

Ikinyarwanda

rw

Kirundi

Ikirundi

rn

Komi

коми кыв

kv

Kongo

Kikongo

kg

Korean

한국어

ko

Kurdish

Kurdî, كوردی‎

ku

Kwanyama, Kuanyama

Kuanyama

kj

Kyrgyz

Кыргызча, Кыргыз тили

ky

Lao

ພາສາລາວ

lo

Latin

latine, lingua latina

la

Latvian

latviešu valoda

lv

Limburgish, Limburgan, Limburger

Limburgs

li

Lingala

Lingála

ln

Lithuanian

lietuvių kalba

lt

Luba-Katanga

Tshiluba

lu

Luxembourgish, Letzeburgesch

Lëtzebuergesch

lb

Macedonian

македонски јазик

mk

Malagasy

fiteny malagasy

mg

Malay

bahasa Melayu, بهاس ملايو‎”

ms

Malayalam

മലയാളം

ml

Maltese

Malti

mt

Manx

Gaelg, Gailck

gv

Māori

te reo Māori

mi

Marathi (Marāṭhī)

मराठी

mr

Marshallese

Kajin M̧ajeļ

mh

Mongolian

Монгол хэл

mn

Nauruan

Dorerin Naoero

na

Navajo, Navaho

Diné bizaad

nv

Ndonga

Owambo

ng

Nepali

नेपाली

ne

Northern Ndebele

isiNdebele

nd

Northern Sami

Davvisámegiella

se

Norwegian

Norsk

no

Norwegian Bokmål

Norsk bokmål

nb

Norwegian Nynorsk

Norsk nynorsk

nn

Nuosu

ꆈꌠ꒿ Nuosuhxop

ii

Occitan

occitan, lenga d’òc

oc

Ojibwe, Ojibwa

ᐊᓂᔑᓈᐯᒧᐎᓐ

oj

Old Church Slavonic, Church Slavonic, Old Bulgarian

ѩзыкъ словѣньскъ

cu

Oriya

ଓଡ଼ିଆ

or

Oromo

Afaan Oromoo

om

Ossetian, Ossetic

ирон æвзаг

os

(Eastern) Punjabi

ਪੰਜਾਬੀ

pa

Pāli

पाऴि

pi

Pashto, Pushto

پښتو

ps

Persian (Farsi)

فارسی

fa

Polish

język polski, polszczyzna

pl

Portuguese

Português

pt

Quechua

Runa Simi, Kichwa

qu

Romanian

Română

ro

Romansh

rumantsch grischun

rm

Russian

Русский

ru

Samoan

gagana fa’a Samoa

sm

Sango

yângâ tî sängö

sg

Sanskrit (Saṁskṛta)

संस्कृतम्

sa

Sardinian

sardu

sc

Scottish Gaelic, Gaelic

Gàidhlig

gd

Serbian

српски језик

sr

Shona

chiShona

sn

Sindhi

सिन्धी, سنڌي، سندھی‎

sd

Sinhalese, Sinhala

සිංහල

si

Slovak

slovenčina, slovenský jazyk

sk

Slovene

slovenski jezik, slovenščina

sl

Somali

Soomaaliga, af Soomaali

so

Southern Ndebele

isiNdebele

nr

Southern Sotho

Sesotho

st

Spanish

Español

es

Sundanese

Basa Sunda

su

Swahili

Kiswahili

sw

Swati

SiSwati

ss

Swedish

svenska

sv

Tagalog

Wikang Tagalog

tl

Tahitian

Reo Tahiti

ty

Tajik

тоҷикӣ, toçikī, تاجیکی‎

tg

Tamil

தமிழ்

ta

Tatar

татар теле, tatar tele

tt

Telugu

తెలుగు

te

Thai

ไทย

th

Tibetan Standard, Tibetan, Central

བོད་ཡིག

bo

Tigrinya

ትግርኛ

ti

Tonga (Tonga Islands)

faka Tonga

to

Tsonga

Xitsonga

ts

Tswana

Setswana

tn

Turkish

Türkçe

tr

Turkmen

Türkmen, Түркмен

tk

Twi

Twi

tw

Uyghur

ئۇيغۇرچە‎, Uyghurche

ug

Ukrainian

Українська

uk

Urdu

اردو

ur

Uzbek

Oʻzbek, Ўзбек, أۇزبېك‎

uz

Venda

Tshivenḓa

ve

Vietnamese

Tiếng Việt

vi

Volapük

Volapük

vo

Walloon

walon

wa

Welsh

Cymraeg

cy

Western Frisian

Frysk

fy

Wolof

Wollof

wo

Xhosa

isiXhosa

xh

Yiddish

ייִדיש

yi

Yoruba

Yorùbá

yo

Zhuang, Chuang

Saɯ cueŋƅ, Saw cuengh

za

Zulu

isiZulu

zu


_images/language.png

Here are the following fields in this system:

  • Language - Tag for a specific language

  • English Name - International name

  • Name - Local name

  • Active - If you want to activate the language in your application

  • Available in GUI - If you want to make the language available in the GUI

First of all, go to the Dashboard Menus.

_images/dashboardmenuhighlighted1.png

Select Todos model in the list.

_images/todoshighlighted.png

As you notice, English (en) is the only language available in the field.

_images/menunamelanguage.png

If you want to add more languages to show in the Dashboard Menu, go to the Languages in the uAdmin dashboard.

_images/languageshighlighted1.png

Let’s say I want to add Chinese and Tagalog in the menu name of the Todo model. In order to do that, set the Active as enabled.

_images/activehighlighted.png

Now go back to the Dashboard Menus, select Todos model in the list and you will notice that Chinese (zh) and Tagalog (tl) are added in the Menu Name field. Put your translated text into the related language manually.

_images/chinesetagalogdashboardmenu.png

Once you are done, log out your account then login. Set your language to 中文 (Zhōngwén), 汉语, 漢語 (Chinese).

_images/loginformchinese.png

When you notice, the Todos model is now translated to Chinese. That’s cool!

_images/todoschinese.png

Now log out your account then login again. This time set your language to Wikang Tagalog (Tagalog) and let’s see what happens.

_images/loginformtagalog.png

Result

_images/todostagalog.png

Nice! The Todos model is successfully translated to Tagalog.

Now let’s try something more. Go to the Languages, search for Vietnamese, and set it as Default and Active.

_images/vietnamesedefaultactive.png

Log out your account, refresh your browser several times and see what happens.

_images/vietnamesedefault.png

It automatically sets the value of the Language field to Tiếng Việt (Vietnamese).

Login your account again, go to the Languages, search for Arabic, and activate RTL (Right-to-left) and Active.

_images/arabicrtl.png

Log out your account then login again. Set your language to (Arabic) العربية and let’s see what happens.

_images/loginformarabic.png

The login page has aligned from right to left.

Even if you go to any models in the dashboard (example below is Dashboard Menus), it aligns the form automatically from right to left.

_images/dashboardmenurighttoleft.png

Well done! Now you know how to activate your languages, set it to default, and using RTL (Right-to-left).

Log

Log is a system in uAdmin that is used to add, modify, and delete the status of the user activities. It keeps track of many things by default.

_images/log.png

Here are the following fields in this system:

  • Log - Returns the ID number of itself

  • Username - An identification used by a person

  • Action - See uadmin.Action for more details.

  • Table Name - The name of the model

  • Table - ID number of the table

  • Activity - This shows you what are the fields that you put in your record. It also adds one field for the IP “_IP” the user was using for security.

  • Roll Back - Undo the changes for edit and delete logs

  • Created At - Displays the date where the log was created

Let’s open our app to see how these things work. Login your account using “admin” as username and password.

_images/loginformadmin.png

Go to “LOGS” model in your dashboard.

_images/logshighlighted.png

You will notice that you have logs for the action “Login Successful” that you have taken in your app which is what we have done a while ago. Log is served as the history of all your activities in your app.

_images/loginsuccessful.png

If you open any of these logs, you will see all the details of that log:

_images/logdetails.png

The activity is the main part of your log. This shows you what are the fields that you put in your record. It also adds one field for the IP “IP” the user was using for security.

Let’s go back to the previous page, refresh your browser and see what happens.

_images/goback.png

Result

_images/read.png

You will notice that there is another type of action called “Read” using the admin account because we opened a record in the log table.

Go back to the uAdmin Dashboard and open “TODOS” model.

_images/todoshighlightedlog.png

Click Add New TODO.

_images/todomodel.png

Fill up the fields like in the example below:

_images/todomodelcreate.png

Save it and new data will be added to your model.

_images/todomodeloutput.png

Open your created record in Todo model. Notice that you have a “History” button when you open any record:

_images/history.png

This “History” button will give you logs related to this record:

_images/readadded.png

As you notice, the logs keep track of what we have added in the Todo model as well as we have opened a while ago.

Open “TODOS” model and let’s change the record from “Read a book” to “Read a magazine”.

_images/readamagazine.png

Now if I go to “LOGS”, you will notice that the action says we “Modified” a record in the todo table. There’s also a Rollback button which means we can undo any changes.

_images/modifiedrollback.png

Click on “Roll Back” and see what happens.

_images/reverthandler.png

You will not see anything in the screen except the white background. To fix this, type 0.0.0.0:8000 in the address bar. Once you are done, you will see the uAdmin dashboard again. Open “TODOS” model.

_images/todoshighlightedlog.png

You will notice that the name field has reverted from “Read a magazine” to “Read a book”.

_images/todomodeloutput.png

Let’s delete a record in the Todo model.

_images/deleterecord.png

Now if I go to “LOGS”, you will notice that the action says we “Deleted” a record in the todo table. There’s also a Rollback button which means we can undo any changes. This is a good feature for the user who accidentally delete their records in the model.

_images/logdeleted.png

Click on “Roll Back” and see what happens.

_images/reverthandlerlog7.png

You will not see anything in the screen except the white background. To fix this, type 0.0.0.0:8000 in the address bar. Once you are done, you will see the uAdmin dashboard again. Open “TODOS” model.

_images/todoshighlightedlog.png

As expected, we recovered a record in the Todo model.

_images/todomodeloutput.png

Now click the profile icon on the top right corner then choose “Logout”.

_images/logoutfromtodo.png

Input your username and password that is not existing in the User System Model then click Login.

_images/loginformnonexistent.png

You will see an error that says “Invalid Username”. Now login using “admin as username and password.

_images/loginforminvaliduser.png

Now go to “LOGS” again. If you scroll it down, you will notice that your logout and login denied actions were recorded in the list.

_images/logindeniedlogout.png

Go back to the uAdmin Dashboard then select “USERS”.

_images/usershighlighted1.png

Choose System Admin account then input your email. Email is necessary for exchanging messages between people or for password recovery.

_images/systemadminemail.png

Make it sure that you have a ready-made email configurations in main.go.

func main(){
    uadmin.EmailFrom = "myemail@integritynet.biz"
    uadmin.EmailUsername = "myemail@integritynet.biz"
    uadmin.EmailPassword = "abc123"
    uadmin.EmailSMTPServer = "smtp.integritynet.biz"
    uadmin.EmailSMTPServerPort = 587
    // Some codes
}

Once you are done, rebuild your application first (if you haven’t set the email configurations yet) before you log out your account. At the moment, you suddenly forgot your password. How can we retrieve our account? Click Forgot Password at the bottom of the login form.

_images/forgotpasswordhighlighted.png

Input your email address based on the user account you wish to retrieve it back.

_images/forgotpasswordinputemail.png

Once you are done, open your email account. You will receive a password reset notification from the Todo List support. To reset your password, click the link highlighted below.

_images/passwordresetnotification.png

You will be greeted by the reset password form. For now, try not to match the new and confirm reset password and see what happens.

_images/newconfirmresetnotmatch.png

Result

_images/passwordresetforminvalid.png

In uAdmin, you can only use one reset password per key. In this case, go back to the login form, select Forget Password, type your email to resend the request. This time input the following information that does match in order to create a new password for you.

Once you are done, you can now access your account using your new password.

Go to “LOGS” again, scroll it down and you will see that our password reset is denied on the first attempt then we reset the password successfully on our last attempt. That’s how powerful the uAdmin log is, the way it keeps track of many things.

_images/passwordresetactions.png

Logs can accumulate so fast and it will get harder to find specific actions when you need to like when conducting an audit and investigating something in your system. Use “Filter” to narrow down what you are looking for:

_images/filterlog.png

Congrats, now you know how to understand records you have in your app and how to audit them and revert back actions when you need to.

Profile

uAdmin has a feature that allows you to customize your own profile. In order to do that, click the profile icon on the top right corner then select admin highlighted below.

_images/adminhighlighted.png

By default, there is no profile photo inserted on the top left corner. If you want to add it in your profile, click the Choose File button to browse the image on your computer.

_images/choosefilephotohighlighted.png

Once you are done, click Save Changes on the left corner and refresh the webpage to see the output.

_images/profilepicadded1.png

No matter what small or large the pixels you upload in your profile, it will automatically resize the photo to static format.

You can also enable two factor authentication in your profile by using Google authenticator. In uAdmin, it uses QR code which is typically used for storing URLs or other information for reading by the camera on a smartphone.

_images/enable2fa.png

If there is a problem, you may go to your terminal and check the OTP verification code for login.

Session

Session is an activity that a user with a unique IP address spends on a Web site during a specified period of time. 1

_images/sessioninterface.png

Here are the following fields in this system:

  • Key - Displays a random string

  • User - Returns the first and last name

  • Login Time - This is when the user logins to the dashboard.

  • Last Login - This is when the user has last access to the account.

  • Active - If it is not checked, you will not be able to login with that user.

  • IP - Numerical label assigned to the session from the address bar that user connects to

  • Pending OTP - If the user has not verifying the OTP in the login

  • Expires On - This is when the cookie will expire.

Let’s open our app to see how these things work. Login your account using “admin” as username and password.

_images/loginformadmin.png

The Session model is hidden in the uAdmin Dashboard by default. In order to show it, go to “DASHBOARD MENUS” first.

_images/dashboardmenuhighlighted1.png

Select Sessions model in the list.

_images/sessionshighlighted.png

Turn off the Hidden field so that the Session model will become visible in the uAdmin Dashboard.

_images/sessionshiddenturnoff.png

Go back to the uAdmin Dashboard and open “SESSIONS”.

_images/sessionshighlighteddashboard.png

If this is your first time to run an application, you will see only one session in the list as shown below.

_images/sessionlist.png

If you open the record, you will see all the details of that session. Let’s turn off the Active, save it and see what happens.

_images/activeturnoff.png

It will automatically redirect you to the login page which means your session has been deactivated. Login your account again using “admin” as username and password.

_images/logoutfromsession.png

Your session automatically generates a new key for you.

_images/sessionautomaticcreate.png

Before we proceed to Pending OTP, go to the uAdmin Dashboard and select “USERS”.

_images/usershighlighted1.png

Choose System Admin and activate the OTP required.

_images/otprequired.png

Now go back to Sessions model then click the previous record.

_images/firstsession.png

Enable the “Active” and “Pending OTP” then click Save.

_images/activepending.png

Now log out your account. Login again using “admin” as username and password then see what happens.

You will be asked to input a verification code in the login form. Check your terminal to see the OTP code.

[  INFO  ]   User: admin OTP: 245421
_images/loginformotp.png

Open “SESSIONS” model. You will notice that the second session is no longer active after you logout. The last login has changed because you reuse that session. It was reused because you set that session as Active before you logout. Lastly, the Pending OTP is no longer checked because you already verified OTP code given by your terminal.

_images/sessionchanges.png

Finally, set the Expires On value to now.

Warning

Use it at your own risk. Once the session expires, your account will be permanently deactivated. In this case, you must have an extra user account in the User database.

_images/sessionexpireson.png

Save it and see what happens.

_images/sessionloginform.png

It will automatically redirect you to the login page which means your session has expired. In this case, you must login using another account that has no expiry date in the session.

Well done! Now you know how to configure your sessions by using Active, Pending OTP, and Expires On.

User

User is a system in uAdmin that is used to add, modify and delete the elements of the user. By default, the system creates one user which is the admin user who has full permission to read, add edit and delete data from every model.

_images/user.png

Here are the following fields in this system:

  • User - Returns the first and last name

  • Username - An identification used by a person

  • First Name - Given name

  • Last Name - Surname

  • Email - An electronic mail address used for exchanging messages between people or for password recovery

  • Active - If it is not checked, you will not be able to login with that user.

  • Admin - Allows full access to everything where you can set permissions to the user

  • Remote Access - If it is not checked, you will only be able to login if you are connected to the server using a private IP e.g. (10.x.x.x,192.168.x.x, 127.x.x.x or ::1).

  • User Group - To belong a specific user to the group. If the user group has permissions, the user can access to something with some restrictions.

  • Photo - This is where you can upload your profile picture in your account.

  • Last Login - This is when the user has last access to the account.

  • Expires On - This is when the cookie will expire.

  • OTP Required - Adds an extra layer of security by sending the verification code

Let’s create a new user account called “even” with the First Name “Even” and the Last Name “Demata”. Set the Active, Admin, and Remote Access fields to true.

_images/useraddsystem.png

Result

_images/useraddsystemoutput.png

Now log out your account and login again using the name “even”.

_images/loginformeven.png

As expected, you will see the same dashboard like using your System Admin account. It’s because you are an admin and has full permissions to everything. For now, let’s set an email address to “myemail@integritynet.biz”.

_images/useremailhighlighted.png

Make it sure that you have set an email configurations in main.go.

func main(){
    uadmin.EmailFrom = "myemail@integritynet.biz"
    uadmin.EmailUsername = "myemail@integritynet.biz"
    uadmin.EmailPassword = "abc123"
    uadmin.EmailSMTPServer = "smtp.integritynet.biz"
    uadmin.EmailSMTPServerPort = 587
    // Some codes
}

Log out your account. At the moment, you suddenly forgot your password. How can we retrieve our account? Click Forgot Password at the bottom of the login form.

_images/forgotpasswordhighlighted.png

Input your email address based on the user account you wish to retrieve it back.

_images/forgotpasswordinputemail.png

Once you are done, open your email account. You will receive a password reset notification from the Todo List support. To reset your password, click the link highlighted below.

_images/passwordresetnotification.png

You will be greeted by the reset password form. Input the following information in order to create a new password for you.

_images/resetpasswordform.png

Once you are done, you can now access your account using your new password.

Login your System Admin account. Turn off the Admin and Remote Access fields in Even Demata account.

_images/adminremoteturnedoff.png

Logout your System Admin account and login the Even Demata account. Let’s see what happens.

_images/dashboardmenuempty.png

The dashboard menu is empty. How can we get access to it at least some of them? We need to set the user permission to Even Demata account so login your System account, go to Users model, select Even Demata account then go to the User Permission tab. Afterwards, click Add New User Permission button at the right side.

_images/addnewuserpermission.png

Set the Dashboard Menu to “Todos” model, User linked to “Even Demata”, and activate the “Read” only. It means Even Demata user account has restricted access to adding, editing and deleting a record in the Todos model.

_images/userpermissionevendemata.png

Result

_images/userpermissionevendemataoutput.png

Log out your System Admin account. This time login your username and password using the user account that has user permission. Afterwards, you will see that only the Todos model is shown in the dashboard because your user account is not an admin and has no remote access to it. Now click on TODOS model.

_images/userpermissiondashboard.png

As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

_images/useraddeditdeleterestricted.png

Login your System Admin account again, go to the User Group and create a group named “Front Desk”.

_images/usergroupcreated.png

Link your created user group to Even Demata account.

_images/useraccountfrontdesklinked.png

Afterwards, click the Front Desk highlighted below.

_images/frontdeskhighlighted.png

Go to the Group Permission tab. Afterwards, click Add New Group Permission button at the right side.

_images/addnewgrouppermission.png

Set the Dashboard Menu to “Todos” model, User linked to “Even Demata”, and activate the “Add” only. It means Even Demata user account has restricted access to reading, editing and deleting a record in the Todos model.

_images/grouppermissionevendemata.png

Result

_images/grouppermissionevendemataoutput.png

Log out your System Admin account. This time login your username and password using the user account that has group permission. Now click on TODOS model.

_images/userpermissiondashboard.png

As you will see, your user account is still restricted to add, edit, or delete a record in the Todo model even if your group permission has access to “Read” only. It’s because the user permission has no access to “Read” even if Even Demata is part of the Front Desk group. In other words, user permission prioritizes more than group permission.

_images/useraddeditdeleterestricted.png

Login your System Admin account again. Go back to the Users model, select Even Demata account, and let’s upload a profile picture. If you don’t have any pictures or icons in your computer, I would recommend you to go over flaticon.com, but you can browse anywhere online. Once you search for an icon, download the PNG version and choose the size 128 pixels.

_images/userphotohighlighted.png

Logout your System Admin account. Login your Even Demata account, click on profile icon then select “even” highlighted below.

_images/evenhighlighted.png

You will notice that your profile picture has been uploaded in your user account.

_images/profileeven.png

Login your System Admin account again. Go back to the Users model, select Even Demata account, and activate the OTP Required.

_images/otprequiredeven.png

Logout your System Admin account then Login Even Demata account. Afterwards, you will see the second form as shown below. It requires you to input a Verification Code given by your terminal.

Terminal

[  INFO  ]   User: even OTP: 812567
_images/loginformwithotp.png

Once you are done, it will redirect you to the uAdmin dashboard. Login your System Admin account again, go back to the Users model, select Even Demata account, and set the Expires On to now.

_images/expiresoneven.png

Log out your System Admin account, login Even Demata account and see what happens.

_images/logoutredirect.png

It will log you out automatically because Even Demata account has already expired.

Login your System Admin account. Go to Users model and finally, delete the Even Demata account.

_images/deleteuser.png

Well done! Now you know how to configure your user by adding, updating, customizing and deleting a user account.

User Group

User Group is a system in uAdmin used to add, modify, and delete the group name, the only field in this system. It has only one field: Group Name. It is useful if you want to belong a specific user to the group. If the user group has permissions, the user can access to something with some restrictions.

Let’s create a new user group named “Front Desk”.

_images/usergroupcreated.png

Afterwards, link it to any of your existing user accounts.

_images/useraccountfrontdesklinked.png

Result

_images/frontdeskhighlighted.png

Finally, delete the Front Desk User Group.

_images/usergroupdelete.png

Well done! Now you know how to add a user group, link it to your existing user accounts, and deleting the user group.

User Permission

User Permission sets the permission of a user handled by an administrator.

_images/userpermissioncreated.png

Here are the following fields in this system:

  • User Permission - Returns the ID number of itself

  • Dashboard Menu - Fetches the name of the model

  • User - Fetches the first and last name of the user

  • Read - Sets the Read access to the user

  • Add - Sets the Add access to the user

  • Edit - Sets the Edit access to the user

  • Delete - Sets the Delete access to the user

First of all, make it sure that your existing account is not an Admin (example below is Even Demata).

_images/adminhighlighted1.png

Set the Dashboard Menu to any of your existing models (example below is Todos), link it to any of your existing accounts, and activate the “Read” only. It means Even Demata account has restricted access to adding, editing and deleting a record in the Todos model.

_images/userpermissionevendemata.png

Result

_images/userpermissionevendemataoutput.png

Log out your System Admin account. This time login your username and password using the user account that has user permission. Afterwards, you will see that only the Todos model is shown in the dashboard because your user account is not an admin and has no remote access to it. Now click on TODOS model.

_images/userpermissiondashboard.png

As you will see, your user account is restricted to add, edit, or delete a record in the Todo model. You can only read what is inside this model.

_images/useraddeditdeleterestricted.png

To remove those restrictions, login your System Admin account, go to User Permission and activate “Add”, “Edit”, and “Delete” access to Even Demata account.

_images/useraddeditdelete.png

Login your Even Demata account and see what happens.

_images/useraccessadddelete.png

Let’s open the “Read a book” record to see if the user can have access to edit.

_images/useraccessedit.png

Nice! You have full access to everything in the TODOS model. What if the user has no access to “Read” but can add, edit, or delete a record? Login your System account and remove “Read” access to Even Demata.

_images/usernoaccessread.png

Login your Even Demata account and see what happens.

_images/dashboardmenuempty.png

TODOS model does not show up in the dashboard. Even if you remove access to “Add”, “Edit” and “Delete” to Even Demata account, it will display the same output.

Login your System Admin account. Finally, delete the User Permission in Even Demata account.

_images/userpermissiondelete.png

Well done! Now you know how to set the user permission to the user account, changing the access in the model and deleting the user permission.

Reference

1

QuinStreet Inc. (2018). User Session. Retrieved from https://www.webopedia.com/TERM/U/user_session.html