Font family should fallback to Source Code Pro if not valid. #392
Update user management docs.pull/8600/head
parent
0914ec24ad
commit
82c5febde6
Binary file not shown.
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 47 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 70 KiB |
|
|
@ -417,9 +417,9 @@ Use the fields on the *Editor* panel to change settings of the query editor.
|
|||
* When the *Code folding?* switch is set to *False*, the editor will disable
|
||||
code folding. Disabling will improve editor performance with large files.
|
||||
|
||||
* Use the *Font family* field to specify the font family that will be used in
|
||||
all SQL text boxes and editors. If the font is not found, the default font
|
||||
of *Source Code Pro* will be used.
|
||||
* Use the *Font family* field to be used for all SQL editors. The specified
|
||||
font should already be installed on your system. If the font is not found,
|
||||
the editor will fall back to the default font, Source Code Pro.
|
||||
|
||||
* Use the *Font size* field to specify the font size that will be used in text
|
||||
boxes and editors.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.. _user_management:
|
||||
|
||||
*******************************
|
||||
`User Management Dialog`:index:
|
||||
`User Management`:index:
|
||||
*******************************
|
||||
|
||||
When invoking pgAdmin in desktop mode, a password is randomly generated, and
|
||||
|
|
@ -9,12 +9,17 @@ then ignored. If you install pgAdmin in server mode, you will be prompted for
|
|||
an administrator email and password for the pgAdmin client.
|
||||
|
||||
When you authenticate with pgAdmin, the server definitions associated with that
|
||||
login role are made available in the tree control. An administrative user can
|
||||
use the *User Management* dialog to:
|
||||
login role are made available in the tree control.
|
||||
|
||||
* add or delete pgAdmin roles
|
||||
* assign privileges
|
||||
* manage the password associated with a role
|
||||
Users Tab
|
||||
*******************
|
||||
An administrative user can use the *Users* tab to:
|
||||
|
||||
* manage pgAdmin users
|
||||
* change users role
|
||||
* change password for a user
|
||||
* deactivate user
|
||||
* unlock a locked user
|
||||
|
||||
.. image:: images/user.png
|
||||
:alt: pgAdmin user management window
|
||||
|
|
@ -26,7 +31,8 @@ the following criteria types: *Authentication source*, *Username*, or *Email*.
|
|||
For example, you can enter *ldap* in the search box and only the records having
|
||||
*ldap* as authentication source will be displayed in the *User Management* table.
|
||||
|
||||
To add a user, click the Add (+) button at the top right corner.
|
||||
To add a user, click the Add (+) button at the top left corner. It will open a
|
||||
dialog where you can fill in details for the new user.
|
||||
|
||||
.. image:: images/add_user.png
|
||||
:alt: pgAdmin user management window add new user
|
||||
|
|
@ -34,34 +40,30 @@ To add a user, click the Add (+) button at the top right corner.
|
|||
|
||||
Provide information about the new pgAdmin role in the row:
|
||||
|
||||
* Use the drop-down list box next to *Authentication source* field to select the
|
||||
type of authentication that should be used for the user. If authentication
|
||||
source is only 'internal' then *Authentication source* field
|
||||
is disabled. Supported *Authentication source* are internal, ldap, kerberos,
|
||||
oauth2 and webserver.
|
||||
* Click in the *Username* field, and provide a username for the user. This field
|
||||
* Use the *Authentication source* field to select the type of authentication that
|
||||
should be used for the user. If authentication source in the pgAdmin server config
|
||||
has 'internal' only then *Authentication source* field will be disabled. Supported
|
||||
*Authentication source* are internal, ldap, kerberos, oauth2 and webserver.
|
||||
* Use the *Username* field to provide a username for the user. This field
|
||||
is enabled only when you select authentication source except *internal*. If you
|
||||
select *internal* as authentication source, your email address is displayed in the
|
||||
username field.
|
||||
* Click in the *Email* field, and provide an email address for the user.
|
||||
* Use the drop-down list box next to *Role* to select whether a user is an
|
||||
*Administrator* or a *User*.
|
||||
|
||||
select *internal* as authentication source, your email address will be taken as
|
||||
the username.
|
||||
* Use the *Email* field to provide an email address for the user. Email is a
|
||||
mandatory field for authentication source *internal*.
|
||||
* Use the *Role* field to select whether a user is an *Administrator* or a *User*.
|
||||
* Select *Administrator* if the user will have administrative privileges
|
||||
within the pgAdmin client.
|
||||
* Select *User* to create a non-administrative user account.
|
||||
|
||||
* Move the *Active* switch to the *No* position if the account is not currently
|
||||
active; the default is *Yes*. Use this switch to disable account activity
|
||||
without deleting an account.
|
||||
* Use the *Active* switch to enable or disable account activity without deleting an
|
||||
account; by default it is enabled.
|
||||
* Use the *New password* field to provide the password associated with the user
|
||||
specified in the *Email* field. This field is disabled if you select any
|
||||
authentication source except *internal*.
|
||||
* Re-enter the password in the *Confirm password* field. This field is disabled
|
||||
if you select *ldap* as authentication source.
|
||||
* *Locked* switch is disabled by default when set to *False*. It is only enabled
|
||||
when the user is locked by trying unsuccessful login attempts. Move the switch
|
||||
to the *False* position if you want to unlock the account.
|
||||
* *Locked* switch cannot be changed if is turned off. It can only be changed
|
||||
when the user is locked by trying unsuccessful login attempts. Turn off the
|
||||
switch if you want to unlock the account.
|
||||
|
||||
To discard a user, and revoke access to pgAdmin, click the trash icon to the
|
||||
left of the row and confirm deletion in the *Delete user?* dialog. If the user
|
||||
|
|
@ -72,9 +74,8 @@ dialog will appear to change the ownership of a shared server.
|
|||
Users with the *Administrator* role are able to add, edit and remove pgAdmin
|
||||
users, but otherwise have the same capabilities as those with the *User* role.
|
||||
|
||||
* Click the *Refresh* button to get latest users list.
|
||||
* Click the *Help* button (?) to access online help.
|
||||
* Click the *Close* button to save work. You will be prompted to return to the
|
||||
dialog if your selections cannot be saved.
|
||||
|
||||
|
||||
Using 'setup.py' command line script
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ basicSettings = createTheme(basicSettings, {
|
|||
fontSize: 14,
|
||||
htmlFontSize: 14,
|
||||
fontFamilyIcon: '"Font Awesome 5 Free"',
|
||||
fontFamilySourceCode: '"Source Code Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
||||
fontFamily: [
|
||||
'Roboto',
|
||||
'"Helvetica Neue"',
|
||||
|
|
@ -367,7 +368,7 @@ function getFinalTheme(baseTheme) {
|
|||
flexGrow: 1,
|
||||
},
|
||||
fontSourceCode: {
|
||||
fontFamily: '"Source Code Pro", SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',
|
||||
fontFamily: basicSettings.typography.fontFamilySourceCode,
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ import activeLineExtn from '../extensions/activeLineMarker';
|
|||
import currentQueryHighlighterExtn from '../extensions/currentQueryHighlighter';
|
||||
import { autoCompleteCompartment, eolCompartment, indentNewLine, eol } from '../extensions/extraStates';
|
||||
import { OS_EOL } from '../../../../../tools/sqleditor/static/js/components/QueryToolConstants';
|
||||
import { useTheme } from '@mui/material';
|
||||
|
||||
const arrowRightHtml = ReactDOMServer.renderToString(<KeyboardArrowRightRoundedIcon style={{width: '16px'}} />);
|
||||
const arrowDownHtml = ReactDOMServer.renderToString(<ExpandMoreRoundedIcon style={{width: '16px'}} />);
|
||||
|
|
@ -179,6 +180,7 @@ export default function Editor({
|
|||
};
|
||||
|
||||
const preferencesStore = usePreferences();
|
||||
const theme = useTheme();
|
||||
const editable = !disabled;
|
||||
|
||||
const shortcuts = useRef(new Compartment());
|
||||
|
|
@ -301,9 +303,9 @@ export default function Editor({
|
|||
|
||||
const fontSize = calcFontSize(pref.sql_font_size);
|
||||
newConfigExtn.push(EditorView.theme({
|
||||
'& .cm-content': {
|
||||
'& .cm-scroller .cm-content': {
|
||||
fontSize: fontSize,
|
||||
fontFamily: pref.sql_font_family,
|
||||
fontFamily: `${pref.sql_font_family}, ${theme.typography.fontFamilySourceCode}`,
|
||||
},
|
||||
'.cm-gutters': {
|
||||
fontSize: fontSize,
|
||||
|
|
|
|||
|
|
@ -558,6 +558,7 @@ def create_user(data):
|
|||
|
||||
try:
|
||||
new_data = validate_user(data)
|
||||
new_data['email'] = new_data['email'] if 'email' in new_data else None
|
||||
new_data['password'] = new_data['password']\
|
||||
if 'password' in new_data else None
|
||||
|
||||
|
|
@ -565,7 +566,7 @@ def create_user(data):
|
|||
new_data['roles'] = [Role.query.get(new_data['roles'])]
|
||||
|
||||
except Exception as e:
|
||||
return False, str(e.description)
|
||||
return False, str(e)
|
||||
|
||||
try:
|
||||
_create_new_user(new_data)
|
||||
|
|
|
|||
|
|
@ -35,17 +35,6 @@ class UserSchema extends BaseUISchema {
|
|||
current_user['auth_sources'].includes(AUTH_METHODS['INTERNAL']));
|
||||
}
|
||||
|
||||
deleteUser(deleteRow) {
|
||||
this.pgAdmin.Browser.notifier.confirm(
|
||||
gettext('Delete user?'),
|
||||
gettext('Are you sure you wish to delete this user?'),
|
||||
deleteRow,
|
||||
function() {
|
||||
return true;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isUserNameEnabled(state) {
|
||||
return this.isNew(state) && state.auth_source != AUTH_METHODS['INTERNAL'];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ export default function Users() {
|
|||
setLoading('');
|
||||
};
|
||||
|
||||
pgAdmin.Browser.notifier.confirm(gettext('Delete User'), gettext('Are you sure you want to delete the user %s?', row.original.username),
|
||||
pgAdmin.Browser.notifier.confirmDelete(gettext('Delete User?'), gettext('Are you sure you want to delete the user %s?', `<strong>${row.original.username}</strong>`),
|
||||
async () => {
|
||||
setLoading(gettext('Deleting user...'));
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue