Skip to content

Commit 5b30cfc

Browse files
committed
Update links to pgAdmin code and documentation
The Git repository for this project moved around the same time as its issue tracker. See: https://postgr.es/m/CA+OCxozG9KV_NCaU9juHCLWti+0hD+tWX053iL3A_S0Z=z9GQg@mail.gmail.com
1 parent 446000b commit 5b30cfc

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

internal/pgadmin/config.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const (
7171
startupMountPath = "/etc/pgadmin"
7272

7373
// configSystemAbsolutePath is imported by pgAdmin after all other config files.
74-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=docs/en_US/config_py.rst;hb=REL-4_30
74+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/docs/en_US/config_py.rst
7575
configSystemAbsolutePath = startupMountPath + "/config_system.py"
7676
)
7777

@@ -125,13 +125,13 @@ func podConfigFiles(configmap *corev1.ConfigMap, spec v1beta1.PGAdminPodSpec) []
125125
func startupCommand() []string {
126126
// pgAdmin reads from the following file by importing its public names.
127127
// Make sure to assign only to variables that begin with underscore U+005F.
128-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/config.py;hb=REL-4_30#l669
128+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/config.py#L669
129129
// - https://docs.python.org/3/reference/simple_stmts.html#import
130130
//
131131
// DEFAULT_BINARY_PATHS contains the paths to various client tools. The "pg"
132132
// key is for PostgreSQL. Use the latest version found in "/usr" or fallback
133133
// to the default of empty string.
134-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/config.py;hb=REL-4_30#l415
134+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/config.py#L415
135135
//
136136
// Python 3.6.8 (default, Sep 10 2021, 09:13:53)
137137
// >>> sorted(['']+[]).pop()
@@ -177,7 +177,7 @@ func systemSettings(spec *v1beta1.PGAdminPodSpec) map[string]interface{} {
177177
}
178178

179179
// SERVER_MODE must always be enabled when running on a webserver.
180-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/config.py;hb=REL-4_30#l105
180+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/config.py#L105
181181
settings["SERVER_MODE"] = true
182182

183183
return settings

internal/pgadmin/users.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cluster = types.SimpleNamespace()
6363
// packages expect to find themselves on the search path, so prepend
6464
// that directory there (like pgAdmin does in its WSGI entrypoint).
6565
// - https://pypi.org/project/pgadmin4/
66-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgAdmin4.wsgi;hb=REL-4_30#l18
66+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgAdmin4.wsgi#L18
6767
`
6868
import importlib.util
6969
import os
@@ -99,7 +99,7 @@ with create_app().app_context():`,
9999
// creates its configuration database. Clear that email and username
100100
// so they cannot conflict with users we create, and deactivate the user
101101
// so it cannot log in.
102-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/migrations/versions/fdc58d9bd449_.py;hb=REL-4_30#l129
102+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/migrations/versions/fdc58d9bd449_.py#L129
103103
`
104104
admin = db.session.query(User).filter_by(id=1).first()
105105
admin.active = False
@@ -116,12 +116,12 @@ with create_app().app_context():`,
116116
// The "internal" authentication source requires that username and email
117117
// be the same and be an email address. Append "@pgo" to the username
118118
// to pass login validation.
119-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/authenticate/internal.py;hb=REL-4_30#l88
120-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/utils/validation_utils.py;hb=REL-4_30#l13
119+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/authenticate/internal.py#L88
120+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/utils/validation_utils.py#L13
121121
//
122122
// The "auth_source" and "username" attributes are part of the User
123123
// model since pgAdmin v4.21.
124-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/model/__init__.py;hb=REL-4_30#l66
124+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/model/__init__.py#L66
125125
`
126126
for line in sys.stdin:
127127
if not line.strip():
@@ -142,13 +142,13 @@ with create_app().app_context():`,
142142
// After a user logs in, pgAdmin checks that the "master password" is
143143
// set. It does not seem to use the value nor check that it is valid.
144144
// We set it to "any" to satisfy the check.
145-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/browser/__init__.py;hb=REL-4_30#l963
145+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/browser/__init__.py#L963
146146
//
147147
// The "verify_and_update_password" method hashes the plaintext password
148148
// according to pgAdmin security settings. It is part of the User model
149149
// since pgAdmin v4.19 and Flask-Security-Too v3.20.
150-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=requirements.txt;hb=REL-4_30#l40
151-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/model/__init__.py;hb=REL-4_30#l66
150+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/requirements.txt#L40
151+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/model/__init__.py#L66
152152
// - https://flask-security-too.readthedocs.io/en/stable/api.html#flask_security.UserMixin.verify_and_update_password
153153
`
154154
if user.password:
@@ -166,8 +166,8 @@ with create_app().app_context():`,
166166
// - https://www.pgadmin.org/docs/pgadmin4/latest/server_dialog.html
167167
//
168168
// We use a similar method to the import method when creating server connections
169-
// - https://www.pgadmin.org/docs/pgadmin4/development/import_export_servers.html
170-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/setup.py;hb=REL-4_30#l294
169+
// - https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html
170+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/setup.py#L294
171171
`
172172
group = (
173173
db.session.query(ServerGroup).filter_by(
@@ -204,13 +204,13 @@ with create_app().app_context():`,
204204
server.ssl_mode = "prefer"`,
205205

206206
// Encrypt the Server password with the User's plaintext password.
207-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/__init__.py;hb=REL-4_30#l601
208-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/utils/master_password.py;hb=REL-4_30#l21
209-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/browser/server_groups/servers/__init__.py;hb=REL-4_30#l1091
207+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/__init__.py#L601
208+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/utils/master_password.py#L21
209+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/browser/server_groups/servers/__init__.py#L1091
210210
//
211211
// The "save_password" attribute is part of the Server model since
212212
// pgAdmin v4.21.
213-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/model/__init__.py;hb=REL-4_30#l108
213+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/model/__init__.py#L108
214214
`
215215
server.username = data['username']
216216
server.password = encrypt(data['password'], data['password'])
@@ -221,11 +221,11 @@ with create_app().app_context():`,
221221
// need to delete it and add a new server connection in its place. This
222222
// will require a refresh if pgAdmin web GUI is being used when the
223223
// update takes place.
224-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/browser/server_groups/servers/__init__.py;hb=REL-4_30#l772
224+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-4_30/web/pgadmin/browser/server_groups/servers/__init__.py#L772
225225
//
226226
// TODO(cbandy): We could possibly get the same effect by invalidating
227227
// the user's sessions in pgAdmin v5.4 with Flask-Security-Too v4.
228-
// - https://git.postgresql.org/gitweb/?p=pgadmin4.git;f=web/pgadmin/model/__init__.py;hb=REL-5_4#l67
228+
// - https://github.com/pgadmin-org/pgadmin4/blob/REL-5_4/web/pgadmin/model/__init__.py#L67
229229
// - https://flask-security-too.readthedocs.io/en/stable/api.html#flask_security.UserDatastore.set_uniquifier
230230
`
231231
if server.id and db.session.is_modified(server):

0 commit comments

Comments
 (0)