mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 06:36:19 +01:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
00fe2a527e | ||
|
|
f53ec3b43e | ||
|
|
4d0417f114 | ||
|
|
00903b64db | ||
|
|
a3038cad00 | ||
|
|
ef99f1afac | ||
|
|
cc00d4bd04 | ||
|
|
250f26ff6f | ||
|
|
62b786ca4a | ||
|
|
9cfb47e658 | ||
|
|
ccef27b637 | ||
|
|
8dee61fd39 | ||
|
|
ae64bd0e19 |
@@ -17,13 +17,13 @@ An auth system for EVE Online to help in-game organizations manage online servic
|
|||||||
|
|
||||||
Active Developers:
|
Active Developers:
|
||||||
|
|
||||||
- [Adarnof](https://github.com/adarnof/)
|
- [Adarnof](https://gitlab.com/adarnof/)
|
||||||
- [Basraah](https://github.com/basraah/)
|
- [Basraah](https://gitlab.com/basraah/)
|
||||||
|
|
||||||
Beta Testers / Bug Fixers:
|
Beta Testers / Bug Fixers:
|
||||||
|
|
||||||
- [ghoti](https://github.com/ghoti/)
|
- [ghoti](https://gitlab.com/ChainsawMcGinny/)
|
||||||
- [mmolitor87](https://github.com/mmolitor87/)
|
- [mmolitor87](https://gitlab.com/mmolitor87/)
|
||||||
- [TargetZ3R0](https://github.com/TargetZ3R0)
|
- [TargetZ3R0](https://github.com/TargetZ3R0)
|
||||||
- [kaezon](https://github.com/kaezon/)
|
- [kaezon](https://github.com/kaezon/)
|
||||||
- [orbitroom](https://github.com/orbitroom/)
|
- [orbitroom](https://github.com/orbitroom/)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# This will make sure the app is always imported when
|
# This will make sure the app is always imported when
|
||||||
# Django starts so that shared_task will use this app.
|
# Django starts so that shared_task will use this app.
|
||||||
|
|
||||||
__version__ = '2.1b1'
|
__version__ = '2.1.0'
|
||||||
NAME = 'Alliance Auth v%s' % __version__
|
NAME = 'Alliance Auth v%s' % __version__
|
||||||
default_app_config = 'allianceauth.apps.AllianceAuthConfig'
|
default_app_config = 'allianceauth.apps.AllianceAuthConfig'
|
||||||
|
|||||||
@@ -16,10 +16,16 @@ class CorpStatsQuerySet(models.QuerySet):
|
|||||||
assert char
|
assert char
|
||||||
# build all accepted queries
|
# build all accepted queries
|
||||||
queries = [models.Q(token__user=user)]
|
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'):
|
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'):
|
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__in=user.profile.state.member_corporations.all()))
|
||||||
queries.append(models.Q(corp__alliance__in=user.profile.state.member_alliances.all()))
|
queries.append(models.Q(corp__alliance__in=user.profile.state.member_alliances.all()))
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ class SRPManager:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_kill_data(kill_id):
|
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 = {
|
headers = {
|
||||||
'User-Agent': NAME,
|
'User-Agent': NAME,
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ def get_notifications():
|
|||||||
# Limit notifications to those posted by repo owners and members
|
# Limit notifications to those posted by repo owners and members
|
||||||
response['notifications'] += notifications[:5]
|
response['notifications'] += notifications[:5]
|
||||||
except requests.RequestException:
|
except requests.RequestException:
|
||||||
logger.exception('Error while getting github notifications')
|
logger.exception('Error while getting gitlab notifications')
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ If you intend to use this account as your personal auth account you need to add
|
|||||||
|
|
||||||
## Updating
|
## 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 changes to settings: update your project's settings with `allianceauth update /home/allianceserver/myauth`.
|
||||||
|
|
||||||
|
|||||||
@@ -82,4 +82,4 @@ A similar process can be used to ensure users who may have lost service permissi
|
|||||||
|
|
||||||
## Help
|
## 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).
|
||||||
|
|||||||
@@ -1,161 +1,7 @@
|
|||||||
# Alliance Market
|
# Alliance Market
|
||||||
|
|
||||||
## Dependencies
|
## Deprecation
|
||||||
Alliance Market requires PHP installed in your web server. Apache has `mod_php`, NGINX requires `php-fpm`.
|
|
||||||
|
|
||||||
## Prepare Your Settings
|
Alliance Market relies on the now non-functional XML API.
|
||||||
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
|
|
||||||
|
|
||||||
|
Please remove this service data with `python manage.py migrate appname zero` and then remove from your `INSTALLED_APPS` list.
|
||||||
# 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.
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Now two packages need to be installed:
|
|||||||
|
|
||||||
apt-get install python-software-properties mumble-server
|
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
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
|||||||
@@ -144,5 +144,15 @@ You can allow members to overwrite the portrait with a custom image if desired.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## 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
|
### Prepare Auth
|
||||||
Once settings have been configured, run migrations and restart Gunicorn and Celery.
|
Once settings have been configured, run migrations and restart Gunicorn and Celery.
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
## Something broken? Stuck on an issue? Can't get it set up?
|
## 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?
|
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)
|
- harass us on [gitter](https://gitter.im/R4stl1n/allianceauth)
|
||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|||||||
4
setup.py
4
setup.py
@@ -12,7 +12,7 @@ install_requires = [
|
|||||||
'requests-oauthlib',
|
'requests-oauthlib',
|
||||||
'semantic_version',
|
'semantic_version',
|
||||||
|
|
||||||
'redis',
|
'redis<=2.10.6',
|
||||||
'celery>=4.0.2',
|
'celery>=4.0.2',
|
||||||
'celery_once',
|
'celery_once',
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ setup(
|
|||||||
python_requires='~=3.4',
|
python_requires='~=3.4',
|
||||||
license='GPLv2',
|
license='GPLv2',
|
||||||
packages=['allianceauth'],
|
packages=['allianceauth'],
|
||||||
url='https://github.com/allianceauth/allianceauth',
|
url='https://gitlab.com/allianceauth/allianceauth',
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
entry_points="""
|
entry_points="""
|
||||||
|
|||||||
Reference in New Issue
Block a user