Feature request #18995

use variable in layer source

Added by Pranas Slezas over 2 years ago. Updated over 2 years ago.

Status:Open
Priority:Normal
Assignee:-
Category:GUI
Pull Request or Patch supplied:No Resolution:
Easy fix?:Yes Copied to github as #:26826

Description

use variable in layer source

We using qGis layer and can not use variable in source. We would use this feature for authentication.
User can add project variables and then this variables can be used in layer source (connection)

Example
dbname='pvz1' host=biomon.com port=5432 [email protected] [email protected] sslmode=disable key='pkuid' srid=3346 type=Point table="public"."dirvinis_sejikas" (geometrija) sql=

History

#1 Updated by jd lom over 2 years ago

A better solution is to use the authentication system with basic authentication:

https://docs.qgis.org/2.14/fr/docs/user_manual/auth_system/auth_overview.html

Change the id of the autentication with something like 0000000

Your layer source should be :

dbname='pvz1' biomon.com port=5432 sslmode=disable authcfg=*0000000* key='pkuid' srid=3346 type=Point table="public"."dirvinis_sejikas" (geometrija) sql=

Do this on every client.

Best regards,

Also available in: Atom PDF