Compare commits

...

13 Commits

Author SHA1 Message Date
Basraah
00fe2a527e Version bump to v2.1.0 2018-11-30 07:56:54 +00:00
Basraah
f53ec3b43e Merge branch 'corputils_alliance_fix' into 'master'
None is not a valid alliance ID.

Closes #1122

See merge request allianceauth/allianceauth!1106
2018-11-30 07:54:51 +00:00
colcrunch
4d0417f114 None is not a valid alliance ID. 2018-11-30 07:54:51 +00:00
Basraah
00903b64db Merge branch 'github-to-gitlab' into 'master'
Update GitHub references to Gitlab

See merge request allianceauth/allianceauth!1110
2018-11-30 03:55:19 +00:00
Ariel Rin
a3038cad00 Update GitHub references to Gitlab 2018-11-30 03:55:19 +00:00
Basraah
ef99f1afac Merge branch 'services-market-deprecate' into 'master'
replace market docs with deprecation notice

See merge request allianceauth/allianceauth!1105
2018-11-29 23:55:37 +00:00
Basraah
cc00d4bd04 Merge branch 'services-phpbb3-docsupdate' into 'master'
Set default theme in PHPBB3, explain impact in docs

See merge request allianceauth/allianceauth!1107
2018-11-29 23:51:49 +00:00
Basraah
250f26ff6f Merge branch 'master' into 'master'
django-redis-cache does not support redis 3

See merge request allianceauth/allianceauth!1108
2018-11-29 23:51:22 +00:00
Basraah
62b786ca4a Merge branch 'zkill_fix' into 'master'
Fix srp url for zkill api

See merge request allianceauth/allianceauth!1109
2018-11-29 23:51:09 +00:00
Ariel Rin
9cfb47e658 Limit redis to 2.0 due to 3.0 incompatabilities 2018-11-29 23:12:11 +00:00
Mike
ccef27b637 Fix srp url for zkill api 2018-11-17 20:26:16 -05:00
soratidus999
8dee61fd39 Set default theme in PHPBB3, explain impact in docs
The default theme in PHPBB3 needs to be set or users cannot see the forum, this is needed because AA creates users without a theme set.

Docs explain impact and how to avoid when changing theme later on.
2018-11-15 17:45:33 +10:00
soratidus999
ae64bd0e19 replace docs with deprecation notice 2018-11-14 21:59:05 +10:00
12 changed files with 49 additions and 187 deletions

View File

@@ -17,13 +17,13 @@ An auth system for EVE Online to help in-game organizations manage online servic
Active Developers:
- [Adarnof](https://github.com/adarnof/)
- [Basraah](https://github.com/basraah/)
- [Adarnof](https://gitlab.com/adarnof/)
- [Basraah](https://gitlab.com/basraah/)
Beta Testers / Bug Fixers:
- [ghoti](https://github.com/ghoti/)
- [mmolitor87](https://github.com/mmolitor87/)
- [ghoti](https://gitlab.com/ChainsawMcGinny/)
- [mmolitor87](https://gitlab.com/mmolitor87/)
- [TargetZ3R0](https://github.com/TargetZ3R0)
- [kaezon](https://github.com/kaezon/)
- [orbitroom](https://github.com/orbitroom/)
@@ -32,4 +32,4 @@ Beta Testers / Bug Fixers:
Special thanks to [Nikdoof](https://github.com/nikdoof/), as his [auth](https://github.com/nikdoof/test-auth) was the foundation for the original work on this project.
### Contributing
Make sure you have signed the [License Agreement](https://developers.eveonline.com/resource/license-agreement) by logging in at [https://developers.eveonline.com](https://developers.eveonline.com) before submitting any pull requests.
Make sure you have signed the [License Agreement](https://developers.eveonline.com/resource/license-agreement) by logging in at [https://developers.eveonline.com](https://developers.eveonline.com) before submitting any pull requests.

View File

@@ -1,6 +1,6 @@
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
__version__ = '2.1b1'
__version__ = '2.1.0'
NAME = 'Alliance Auth v%s' % __version__
default_app_config = 'allianceauth.apps.AllianceAuthConfig'

View File

@@ -16,10 +16,16 @@ class CorpStatsQuerySet(models.QuerySet):
assert char
# build all accepted queries
queries = [models.Q(token__user=user)]
if user.has_perm('corputils.view_corp_corpstats'):
queries.append(models.Q(corp__corporation_id=char.corporation_id))
if user.has_perm('corputils.view_alliance_corpstats'):
queries.append(models.Q(corp__alliance__alliance_id=char.alliance_id))
if char.alliance_id is not None:
queries.append(models.Q(corp__alliance__alliance_id=char.alliance_id))
else:
queries.append(models.Q(corp__corporation_id=char.corporation_id))
if user.has_perm('corputils.view_corp_corpstats'):
if user.has_perm('corputils.view_alliance_corpstats'):
pass
else:
queries.append(models.Q(corp__corporation_id=char.corporation_id))
if user.has_perm('corputils.view_state_corpstats'):
queries.append(models.Q(corp__in=user.profile.state.member_corporations.all()))
queries.append(models.Q(corp__alliance__in=user.profile.state.member_alliances.all()))

View File

@@ -24,7 +24,7 @@ class SRPManager:
@staticmethod
def get_kill_data(kill_id):
url = ("https://www.zkillboard.com/api/killID/%s/" % kill_id)
url = ("https://zkillboard.com/api/killID/%s/" % kill_id)
headers = {
'User-Agent': NAME,
'Content-Type': 'application/json',

View File

@@ -73,7 +73,7 @@ def get_notifications():
# Limit notifications to those posted by repo owners and members
response['notifications'] += notifications[:5]
except requests.RequestException:
logger.exception('Error while getting github notifications')
logger.exception('Error while getting gitlab notifications')
return response

View File

@@ -2,7 +2,7 @@
```eval_rst
.. tip::
If you are uncomfortable with Linux permissions follow the steps below as the root user.
If you are uncomfortable with Linux permissions follow the steps below as the root user.
```
## Dependencies
@@ -12,7 +12,7 @@ Alliance Auth can be installed on any operating system. Dependencies are provide
```eval_rst
.. hint::
CentOS: A few packages are included in a non-default repository. Add it and update the package lists. ::
yum -y install https://centos7.iuscommunity.org/ius-release.rpm
yum update
```
@@ -61,7 +61,7 @@ CentOS:
```eval_rst
.. important::
CentOS: Make sure Redis is running before continuing. ::
systemctl enable redis.service
systemctl start redis.service
```
@@ -106,7 +106,7 @@ Create a Python virtual environment and put it somewhere convenient (e.g. `/home
A virtual environment provides support for creating a lightweight "copy" of Python with their own site directories. Each virtual environment has its own Python binary (allowing creation of environments with various Python versions) and can have its own independent set of installed Python packages in its site directories. You can read more about virtual environments on the Python_ docs.
.. _Python: https://docs.python.org/3/library/venv.html
```
Activate the virtualenv using `source /home/allianceserver/venv/auth/bin/activate`. Note the `/bin/activate` on the end of the path.
```eval_rst
@@ -131,7 +131,7 @@ Django needs to install models to the database before it can start.
python /home/allianceserver/myauth/manage.py migrate
Now we need to round up all the static files required to render templates. Make a directory to serve them from and populate it.
mkdir -p /var/www/myauth/static
python /home/allianceserver/myauth/manage.py collectstatic
@@ -182,7 +182,7 @@ You can check the status of the processes with `supervisorctl status`. Logs from
```eval_rst
.. note::
Any time the code or your settings change you'll need to restart Gunicorn and Celery. ::
supervisorctl restart myauth:
```
@@ -202,10 +202,10 @@ If you intend to use this account as your personal auth account you need to add
## Updating
Periodically [new releases](https://github.com/allianceauth/allianceauth/releases/) are issued with bug fixes and new features. To update your install, simply activate your virtual environment and update with `pip install --upgrade allianceauth`. Be sure to read the release notes which will highlight changes.
Periodically [new releases](https://gitlab.com/allianceauth/allianceauth/tags) are issued with bug fixes and new features. To update your install, simply activate your virtual environment and update with `pip install --upgrade allianceauth`. Be sure to read the release notes which will highlight changes.
Some releases come with changes to settings: update your project's settings with `allianceauth update /home/allianceserver/myauth`.
Some releases come with new or changed models. Update your database to reflect this with `python /home/allianceserver/myauth/manage.py migrate`.
Always restart Celery and Gunicorn after updating.

View File

@@ -56,7 +56,7 @@ Put comma-separated IDs into the brackets and the migration will create states w
If you used member/blue group names other than the standard "Member" and "Blue" you can enter settings to have the member/blue states created through this migration take these names.
- `DEFAULT_AUTH_GROUP = ""` the desired name of the "Member" state
- `DEFAULT_BLUE_GROUP = ""` the desired name of the "Blue" state
- `DEFAULT_BLUE_GROUP = ""` the desired name of the "Blue" state
Any permissions assigned to these groups will be copied to the state replacing them. Because these groups are no longer managed they pose a security risk and so are deleted at the end of the migration automatically.
@@ -82,4 +82,4 @@ A similar process can be used to ensure users who may have lost service permissi
## Help
If something goes wrong during the migration reach out for help on [Gitter](https://gitter.im/R4stl1n/allianceauth) or open an [issue](https://github.com/allianceauth/allianceauth/issues).
If something goes wrong during the migration reach out for help on [Gitter](https://gitter.im/R4stl1n/allianceauth) or open an [issue](https://gitlab.com/allianceauth/allianceauth/issues).

View File

@@ -1,161 +1,7 @@
# Alliance Market
## Dependencies
Alliance Market requires PHP installed in your web server. Apache has `mod_php`, NGINX requires `php-fpm`.
## Deprecation
## Prepare Your Settings
In your auth project's settings file, do the following:
- Add `'allianceauth.services.modules.market',` to your `INSTALLED_APPS` list
- Append the following to the bottom of the settings file
Alliance Market relies on the now non-functional XML API.
# Alliance Market
MARKET_URL = ''
DATABASES['market'] = {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'alliance_market',
'USER': 'allianceserver-market',
'PASSWORD': 'password',
'HOST': '127.0.0.1',
'PORT': '3306',
}
## Setup Alliance Market
Alliance Market needs a database. Create one in MySQL/MariaDB. Default name is `alliance_market`:
mysql -u root -p
create database alliance_market;
grant all privileges on alliance_market . * to 'allianceserver'@'localhost';
exit;
Install required packages to clone the repository:
apt-get install mercurial meld
Change to the web folder:
cd /var/www
Now clone the repository
hg clone https://bitbucket.org/krojew/evernus-alliance-market
Make cache and log directories
mkdir evernus-alliance-market/app/cache
mkdir evernus-alliance-market/app/logs
chmod -R 777 evernus-alliance-market/app/cache
chmod -R 777 evernus-alliance-market/app/logs
Change ownership to apache
chown -R www-data:www-data evernus-alliance-market
Enter directory
cd evernus-alliance-market
Set environment variable
export SYMFONY_ENV=prod
Copy configuration
cp app/config/parameters.yml.dist app/config/parameters.yml
Edit, changing the following:
- `database_name` to `alliance_market`
- `database_user` to your MySQL user (usually `allianceserver`)
- `database_password` to your MySQL user password
- email settings, eg Gmail/Mailgun etc.
Edit `app/config/config.yml` and add the following:
services:
fos_user.doctrine_registry:
alias: doctrine
Install composer [as per these instructions.](https://getcomposer.org/download/)
Update dependencies.
php composer.phar update --optimize-autoloader
Prepare the cache:
php app/console cache:clear --env=prod --no-debug
Dump assets:
php app/console assetic:dump --env=prod --no-debug
Create DB entries
php app/console doctrine:schema:update --force
Install SDE:
php app/console evernus:update:sde
Configure your web server to serve alliance market.
A minimal Apache config might look like:
<VirtualHost *:80>
ServerName market.example.com
DocumentRoot /var/www/evernus-alliance-market/web
<Directory "/var/www/evernus-alliance-market/web/">
DirectoryIndex app.php
Require all granted
AllowOverride all
</Directory>
</VirtualHost>
A minimal Nginx config might look like:
server {
listen 80;
server_name market.example.com;
root /var/www/evernus-alliance-market/web;
index app.php;
access_log /var/logs/market.access.log;
# strip app.php/ prefix if it is present
rewrite ^/app\.php/?(.*)$ /$1 permanent;
location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
# pass the PHP scripts to FastCGI server from upstream phpfcgi
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location ~ /\.ht {
deny all;
}
}
Once again, set cache permissions:
chown -R www-data:www-data app/
Add a user account through auth, then make it a superuser:
php app/console fos:user:promote your_username --super
Now edit your auth project's settings file and fill in the web URL to your market as well as the database details.
Finally run migrations and restart Gunicorn and Celery.
Please remove this service data with `python manage.py migrate appname zero` and then remove from your `INSTALLED_APPS` list.

View File

@@ -22,7 +22,7 @@ Now two packages need to be installed:
apt-get install python-software-properties mumble-server
Download the appropriate authenticator release from [the authenticator repository](https://github.com/allianceauth/mumble-authenticator) and install the python dependencies for it:
Download the appropriate authenticator release from [the authenticator repository](https://gitlab.com/allianceauth/mumble-authenticator) and install the python dependencies for it:
pip install -r requirements.txt

View File

@@ -58,7 +58,7 @@ Nginx: `chown -R nginx:nginx /var/www/forums`
```eval_rst
.. tip::
Nginx: Some distributions use the ``www-data:www-data`` user:group instead of ``nginx:nginx``. If you run into problems with permissions try it instead.
Nginx: Some distributions use the ``www-data:www-data`` user:group instead of ``nginx:nginx``. If you run into problems with permissions try it instead.
..
```
@@ -103,7 +103,7 @@ A minimal Nginx config file might look like:
}
}
Enter your forum's web address as the `PHPBB3_URL` setting in your auth project's settings file.
Enter your forum's web address as the `PHPBB3_URL` setting in your auth project's settings file.
### Web Install
Navigate to your forums web address where you will be presented with an installer.
@@ -144,5 +144,15 @@ You can allow members to overwrite the portrait with a custom image if desired.
![location of change avatar setting](/_static/images/installation/services/phpbb3/avatar_permissions.png)
## Setting the default theme
Users generated via Alliance Auth do not have a default theme set. You will need to set this on the phpbb_users table in SQL
mysql -u root -p
use alliance_forum;
alter table phpbb_users change user_style user_style int not null default 1
If you would like to use a theme that is NOT prosilver or theme "1". You will need to deactivate prosilver, this will then fall over to the set forum wide default.
### Prepare Auth
Once settings have been configured, run migrations and restart Gunicorn and Celery.

View File

@@ -2,17 +2,17 @@
## Something broken? Stuck on an issue? Can't get it set up?
Start by checking the [issues](https://github.com/allianceauth/allianceauth/issues?q=is%3Aissue) - especially closed ones.
Start by checking the [issues](https://gitlab.com/allianceauth/allianceauth/issues?scope=all&utf8=%E2%9C%93&state=all&search=my+issue) - especially closed ones.
No answer?
- open an [issue](https://github.com/allianceauth/allianceauth/issues)
- open an [issue](https://gitlab.com/allianceauth/allianceauth/issues)
- harass us on [gitter](https://gitter.im/R4stl1n/allianceauth)
## Logging
In its default configuration your auth project logs INFO and above messages to myauth/log/allianceauth.log. If you're encountering issues it's a good idea to view DEBUG messages as these greatly assist the troubleshooting process. These are printed to the console with manually starting the webserver via `python manage.py runserver`.
To record DEBUG messages in the log file, alter a setting in your auth project's settings file: `LOGGING['handlers']['log_file']['level'] = 'DEBUG'`. After restarting gunicorn and celery your log file will record all logging messages.
To record DEBUG messages in the log file, alter a setting in your auth project's settings file: `LOGGING['handlers']['log_file']['level'] = 'DEBUG'`. After restarting gunicorn and celery your log file will record all logging messages.
## Common Problems

View File

@@ -12,7 +12,7 @@ install_requires = [
'requests-oauthlib',
'semantic_version',
'redis',
'redis<=2.10.6',
'celery>=4.0.2',
'celery_once',
@@ -50,7 +50,7 @@ setup(
python_requires='~=3.4',
license='GPLv2',
packages=['allianceauth'],
url='https://github.com/allianceauth/allianceauth',
url='https://gitlab.com/allianceauth/allianceauth',
zip_safe=False,
include_package_data=True,
entry_points="""