Update code for release of the app in the Nextcloud App Store

This commit is contained in:
Marcin Łojewski
2017-12-23 13:38:05 +01:00
parent b009d4ae20
commit 45195bcd61
8 changed files with 16 additions and 103 deletions

View File

@@ -1,4 +0,0 @@
repo: 3f045a88dd7014290a9bf60cbd740c8548dba967
node: 77b8809852f4a8599200c9a538f94319ca5a4ff4
branch: default
tag: v.2.3.1

View File

@@ -1,2 +0,0 @@
.project
.settings

14
.hgtags
View File

@@ -1,14 +0,0 @@
8401b998f40be1e93d05b5c4db61ba98932c3de3 v0.2
c74b035788ebbcade6bfae22963632f4c5f49540 v0.3
5ee6481afb63f32dcfeaf93a72c07c4bc2a1a993 v0.4
5ee6481afb63f32dcfeaf93a72c07c4bc2a1a993 v0.4
f9eb8e6e4b4f2bcb521554bc513cc94d9ccf6fbd v0.4
df3dc7358b79abdd7075ba78b58fff1da7fa3fde to
df3dc7358b79abdd7075ba78b58fff1da7fa3fde 0.5
df3dc7358b79abdd7075ba78b58fff1da7fa3fde to
0000000000000000000000000000000000000000 to
df3dc7358b79abdd7075ba78b58fff1da7fa3fde 0.5
0000000000000000000000000000000000000000 0.5
845b75d72ec18f3fbf2a74f1a1ec3cf54ca4a304 v0.7
599b774a4b6ac81b44971ac1a319fc41c04e3589 v2.3
1fedd27cb5d8c69a998c8278463c8e8abd1f371a v2.3.0

View File

@@ -1,9 +1,11 @@
user_sql user_sql
======== ========
Owncloud/Nextcloud SQL authentification Owncloud/Nextcloud SQL authentication
This is plugin is heavily based on user_imap, user_pwauth, user_ldap and user_redmine! This repository contains continuation of work done in [this repo](https://www.aboehler.at/hg/user_sql/).
This plugin is heavily based on user_imap, user_pwauth, user_ldap and user_redmine!
Enable it in your Admin -> Apps section and configure your server's details. Enable it in your Admin -> Apps section and configure your server's details.
Currently, it supports most of postfixadmin's encryption options, except dovecot and saslauthd. Currently, it supports most of postfixadmin's encryption options, except dovecot and saslauthd.
@@ -20,5 +22,6 @@ username separated by ';' to login as target user using supervisor's password
Credits Credits
* Andreas Boehler for releasing the first version of this application
* Johan Hendriks provided his user_postfixadmin * Johan Hendriks provided his user_postfixadmin
* Ed Wildgoose for fixing possible SQL injection vulnerability * Ed Wildgoose for fixing possible SQL injection vulnerability

View File

@@ -1,14 +1,16 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<info> <info>
<id>user_sql</id> <id>user_sql_2</id>
<name>SQL user backend</name> <name>SQL user backend 2</name>
<summary>Authenticate Users by SQL</summary> <summary>Authenticate users by SQL queries.</summary>
<description>Authenticate Users by SQL</description> <description>Authenticate users by SQL queries.</description>
<version>2.3.1</version> <version>1.0.0</version>
<licence>agpl</licence> <licence>agpl</licence>
<author>Andreas Boehler &lt;dev (at) aboehler <author>Andreas Boehler &lt;dev (at) aboehler (dot) at &gt;</author>
(dot) at &gt;</author>
<namespace>user_sql</namespace> <namespace>user_sql</namespace>
<bugs>https://github.com/mlojewski-me/user_sql/issues</bugs>
<repository>https://github.com/mlojewski-me/user_sql</repository>
<screenshot>https://raw.githubusercontent.com/mlojewski-me/user_sql/2_v1.0.0/screenshot.png</screenshot>
<types> <types>
<authentication/> <authentication/>
</types> </types>

View File

@@ -1,73 +0,0 @@
<?php
/**
* ownCloud - user_sql
*
* @author Andreas Böhler and contributors
* @copyright 2012-2015 Andreas Böhler <dev (at) aboehler (dot) at>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
$installedVersion = \OC::$server->getConfig()->getAppValue('user_sql', 'installed_version');
$params = array('sql_host' => 'sql_hostname',
'sql_user' => 'sql_username',
'sql_database' => 'sql_database',
'sql_password' => 'sql_password',
'sql_table' => 'sql_table',
'sql_column_username' => 'col_username',
'sql_column_password' => 'col_password',
'sql_type' => 'sql_driver',
'sql_column_active' => 'col_active',
'sql_column_supervisor' => 'supervisor',
'sql_supervisor' => 'set_supervisor',
'strip_domain' => 'set_strip_domain',
'default_domain' => 'set_default_domain',
'crypt_type' => 'set_crypt_type',
'sql_column_displayname' => 'col_displayname',
'allow_password_change' => 'set_allow_pwchange',
'sql_column_active_invert' => 'set_active_invert',
'sql_column_email' => 'col_email',
'mail_sync_mode' => 'set_mail_sync_mode'
);
$delParams = array('domain_settings',
'map_array',
'domain_array'
);
if(version_compare($installedVersion, '1.99', '<'))
{
foreach($params as $oldPar => $newPar)
{
$val = \OC::$server->getConfig()->getAppValue('user_sql', $oldPar);
if(($oldPar === 'strip_domain') || ($oldPar === 'allow_password_change') || ($oldPar === 'sql_column_active_invert'))
{
if($val)
$val = 'true';
else
$val = 'false';
}
if($val)
\OC::$server->getConfig()->setAppValue('user_sql', $newPar.'_default', $val);
\OC::$server->getConfig()->deleteAppValue('user_sql', $oldPar);
}
foreach($delParams as $param)
{
\OC::$server->getConfig()->deleteAppValue('user_sql', $param);
}
}

View File

@@ -17,7 +17,8 @@
#sql-3 p label:first-child, #sql-3 p label:first-child,
#sql-4 p label:first-child, #sql-4 p label:first-child,
#sql-5 p label:first-child, #sql-5 p label:first-child,
#sql-6 p label:first-child { #sql-6 p label:first-child,
#sql-7 p label:first-child {
display: inline-block; display: inline-block;
text-align: right; text-align: right;
width: 300px; width: 300px;

BIN
screenshot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB