RegLogMongoConnector - connector to
mongodb databaseshinytest2-based testsRegLogGsheetConnector able to save logs into
googlesheet databaseWith the release of v0.5.0 there are a lot of changes in the current
implementation of the RegLog system. Most of the changes were
implemented to provide more customization options in implementing
shiny.reglog in your ShinyApp and to widen its
possibilities. At the same time I’ve strived to make the historical
features still accessible, so it shouldn’t be harder to use for novice
Shiny developers.
Instead of using single function to run all logic for RegLog system
(as was the case in deprecated login_server) it introduces
three main components: RegLogServer, two dbConnectors
and two mailConnectors. Below are listed the main changes and
improvements over previous release. For more details you can read two
detailed vignettes: RegLogServer object: fields and methods and
Creating custom RegLogConnector handlers.
RegLogServer R6
class. Arguments provided during initialization of object provide
options for customization, and more importantly objects of classes
providing connection to the database (RegLogDBIConnector or
RegLogGsheetConnector) and to your e-mail provider (RegLogEmayiliConnectororRegLogGmailrConnector`).
RegLogServer$message() reactiveVal.use_modals = F) or specifically (providing named
list of FALSE bool values to use_modals
argument)is_logged, user_id, user_mail
values are now kept inside reactiveVal fields, so you need to
add () to access their values (eg.
RegLogServer$user_id()). Also, account_id
value is added for logged users.modalDialog. It makes the UI more
flexible for this process more flexible.RegLogGsheetConnector provides support for
storing the userbase inside googlesheet. It contains the past
functionality of db_method = 'gsheet' in
login_server.
RegLogDBIConnector provides support for storing
the userbase inside DBI handled database. It improves on
original support for SQLite database, providing also out-of-box support
for multiple MySQL, MariaDB and PostgreSQL databases.login_server.
To sum up, newly introduced functions/classes and their deprecated ancestors:
RegLogServer class replaces
login_serverRegLog_login_UI function replaces
login_UIRegLog_register_UI function replaces
register_UIRegLog_resetPass_UI function replaces
password_reset_UIRegLog_credsEdit_UI function introduces credential edit
UI functionality.RegLogDBIConnector class replaces
login_server(db_method = "sqlite") and widen the
usabilityRegLogGsheetConnector class replaces
login_server(db_method = "gsheet")RegLogEmayiliConnector class replaces
login_server(email_method = "emayili")RegLogGmailrConnector class replaces
login_server(email_method = "gmailr")RegLog_txt function replaces
reglog_txtDBI_tables_create function replaces
create_sqlite_db with added functionalitygsheet_tables_create replaces
create_gsheet_dbRegLogConnectorMessage function to parse your own
messages to connectorsRegLogConnector class to inherit from during creation
of your own connectorsDeprecated without direct replacement:
logout_button: using RegLogServer$logout()
method creating own logout logic is straightforward.sqlite_get_db and gsheet_get_db: getting
tables and sheets is straightforward using functions from
DBI or googlesheets4 packageslogin_server:
use_login_modals enabling developer to silence systemic
modals after any or all login attemptslast_state_change to the reactiveValues object,
that is returned from login_server. It enables to listen to
last state changes of login procedure. Currently it supports only state
changes from login procedure, so it can take this values:
credentials argument to
create_gsheet_db, mirroring the same functionality of
create_sqlite_dblogout_button function, providing the users a way
to log out during usage of ShinyAppcreate_sqlite_db and create_gsheet_db
functionsgmailr and googlesheets4 to use their methods
of email sending and database storagedbplyr dependencycredentials argument to
create_sqlite_db to create SQLite database containing some
datause_language from exported functions, as its
functionality is minimal out of its usage contextsqlite_get_db and gsheet_get_db functions
are now exported, as their functionality grew with added
credentials argumentuser_id value returned by
login_server function for anonymous users. It is now in
form of paste("Anon", Sys.time(), sep = "_") to force its
reads as character object. Before it could be read as
datetime object while reading from ‘googlesheets’ database
and it caused some bugsNEWS.md file to track changes to the
package.create_sqlite_db and
create_gsheet_db