├── database ├── __init__.py ├── versions │ ├── __init__.py │ ├── NOTE │ ├── 003_Alter_groups_apply_rules_unicodetext.py │ ├── 001_Add_groups_table.py │ ├── 002_Add_people_privacy_column.py │ └── 004_Add_groups_invite_only_column.py ├── upgrade-0.8.7.4.sql ├── README └── migrate.cfg ├── fas ├── config │ ├── __init__.py │ ├── .gitignore │ └── log.cfg ├── tests │ ├── __init__.py │ ├── test_model.py │ └── test_controllers.py ├── templates │ ├── __init__.py │ ├── fpca │ │ ├── __init__.py │ │ └── index.html │ ├── group │ │ ├── __init__.py │ │ ├── dump.txt │ │ ├── list.txt │ │ ├── apply.html │ │ ├── invite.html │ │ ├── list.html │ │ ├── members.html │ │ ├── member-list.html │ │ └── new.html │ ├── user │ │ ├── __init__.py │ │ ├── cert.txt │ │ ├── gencertdisabled.html │ │ ├── verifyemail.html │ │ ├── gencert.html │ │ ├── resetpass.html │ │ ├── verifypass.html │ │ ├── changequestion.html │ │ ├── list.html │ │ ├── changepass.html │ │ └── new.html │ ├── help.html │ ├── login.html │ ├── error.html │ ├── welcome.html │ ├── search-box.html │ ├── home.html │ └── about.html ├── static │ ├── robots.txt │ ├── images │ │ ├── yubikey.ico │ │ └── balloons │ │ │ ├── icon.gif │ │ │ ├── button.png │ │ │ ├── balloon-0.png │ │ │ ├── balloon-1.png │ │ │ ├── balloon-2.png │ │ │ └── balloon-3.png │ ├── theme │ │ └── fas │ │ │ └── images │ │ │ ├── hr.png │ │ │ ├── ok.png │ │ │ ├── arrow.png │ │ │ ├── attn.png │ │ │ ├── error.png │ │ │ ├── head.png │ │ │ ├── help.png │ │ │ ├── info.png │ │ │ ├── logo.png │ │ │ ├── queue.png │ │ │ ├── shadow.png │ │ │ ├── tools.png │ │ │ ├── topnav.png │ │ │ ├── account.png │ │ │ ├── approved.png │ │ │ ├── favicon.ico │ │ │ ├── head-dev.png │ │ │ ├── head-stg.png │ │ │ ├── infobar.png │ │ │ ├── sidebar.png │ │ │ ├── success.png │ │ │ ├── warning.png │ │ │ ├── footer-top.png │ │ │ ├── unapproved.png │ │ │ ├── footer-bottom.png │ │ │ ├── header_inner.png │ │ │ ├── icon_warning.png │ │ │ ├── icon_tool-item.png │ │ │ ├── status_approved.png │ │ │ ├── status_rejected.png │ │ │ ├── topnav-separator.png │ │ │ ├── control-separator.png │ │ │ ├── status_incomplete.png │ │ │ ├── tg_under_the_hood.png │ │ │ ├── header-icon_account.png │ │ │ ├── under_the_hood_blue.png │ │ │ └── gnome_audio_volume_medium.png │ ├── fedora-upload-ca.cert │ ├── fedora-server-ca.cert │ └── js │ │ ├── prototype.improvements.js │ │ └── scriptaculous.js ├── model │ └── __init__.py ├── fedmsgshim.py ├── sidebar.py ├── lib │ ├── gpg.py │ └── __init__.py ├── release.py ├── feeds.py ├── __init__.py ├── util.py ├── openssl_fas.py ├── commands.py └── plugin.py ├── plugins ├── fas-plugin-show │ ├── show │ │ ├── __init__.py │ │ ├── versions │ │ │ ├── __init__.py │ │ │ ├── 002_postgres_upgrade.sql │ │ │ ├── 002_postgres_downgrade.sql │ │ │ ├── 005_postgres_upgrade.sql │ │ │ ├── 005_postgres_downgrade.sql │ │ │ ├── 006_add_description_to_shows.py │ │ │ ├── 004_join_people_to_shows.py │ │ │ ├── 001_create.py │ │ │ └── 003_change_owner_to_id.py │ │ ├── README │ │ └── migrate.cfg │ ├── fas_show │ │ ├── templates │ │ │ ├── __init__.py │ │ │ ├── list.txt │ │ │ ├── success.html │ │ │ ├── index.html │ │ │ ├── fail.html │ │ │ ├── list.html │ │ │ ├── view.html │ │ │ ├── join.html │ │ │ ├── new.html │ │ │ └── edit.html │ │ └── help.py │ ├── MANIFEST.in │ ├── script.py │ └── setup.py ├── fas-plugin-dummy │ ├── fas_dummy │ │ ├── templates │ │ │ ├── __init__.py │ │ │ └── index.html │ │ └── __init__.py │ ├── MANIFEST.in │ └── setup.py ├── fas-plugin-asterisk │ ├── fas_asterisk │ │ └── templates │ │ │ ├── __init__.py │ │ │ ├── index.html │ │ │ └── edit.html │ ├── MANIFEST.in │ ├── setup.py │ └── fas-plugin-asterisk.spec ├── fas-plugin-bugzilla │ ├── fas_bugzilla │ │ └── templates │ │ │ ├── __init__.py │ │ │ ├── index.html │ │ │ └── edit.html │ ├── MANIFEST.in │ ├── setup.py │ └── fas-plugin-bugzilla.spec └── fas-plugin-yubikey │ ├── fas_yubikey │ └── templates │ │ ├── __init__.py │ │ ├── edit.html │ │ └── index.html │ ├── MANIFEST.in │ ├── new-key.sh │ ├── setup.py │ ├── gen_yubikey.py │ ├── fas-plugin-yubikey.spec │ ├── README │ └── burn-key.py ├── test.cfg ├── .tx └── config ├── po └── LINGUAS ├── .gitignore ├── requirements.txt ├── scripts ├── account-expiry.cfg ├── export-bugzilla.cfg └── account-expiry.py ├── pybabel.conf ├── TODO ├── fedmsg.d ├── ssl.py ├── base.py └── endpoints.py ├── start-fas ├── fas.conf.wsgi ├── MANIFEST.in ├── updates ├── fas2-0.13.1_to_0.14.0.sql ├── fas2-0.10.0_to_0.11.0.sql ├── fas2-0.8.4_to_0.8.5.sql ├── fas2-0.9.0_to_0.10.0.sql ├── fas2-0.11.0_to_0.12.0.sql ├── fas2-0.8.14_to_0.8.14.90.sql ├── fas2-0.8.7_to_0.8.8.sql ├── fas2-0.8.9.1_to_0.9.0.sql └── fas2-0.8.3_to_0.8.4.sql ├── ca ├── Makefile └── openssl.cnf ├── client ├── restricted-shell └── fas.conf ├── fas.wsgi ├── README.rst └── convert.py /database/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/config/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/versions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/config/.gitignore: -------------------------------------------------------------------------------- 1 | app.cfg 2 | -------------------------------------------------------------------------------- /fas/templates/fpca/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/templates/group/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/templates/user/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/templates/user/cert.txt: -------------------------------------------------------------------------------- 1 | ${cert} 2 | ${key} 3 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /fas/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / 3 | -------------------------------------------------------------------------------- /plugins/fas-plugin-dummy/fas_dummy/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/fas_asterisk/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/fas_bugzilla/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/fas_yubikey/templates/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /database/upgrade-0.8.7.4.sql: -------------------------------------------------------------------------------- 1 | alter table people add column alias_enabled BOOLEAN DEFAULT TRUE; 2 | -------------------------------------------------------------------------------- /fas/static/images/yubikey.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/yubikey.ico -------------------------------------------------------------------------------- /plugins/fas-plugin-dummy/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include __init__.py 2 | include templates/*.html 3 | include templates/*.py 4 | -------------------------------------------------------------------------------- /fas/static/images/balloons/icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/icon.gif -------------------------------------------------------------------------------- /fas/static/theme/fas/images/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/hr.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/ok.png -------------------------------------------------------------------------------- /fas/static/images/balloons/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/button.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/arrow.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/attn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/attn.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/error.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/head.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/help.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/info.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/logo.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/queue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/queue.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/shadow.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/tools.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/topnav.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/topnav.png -------------------------------------------------------------------------------- /fas/static/images/balloons/balloon-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/balloon-0.png -------------------------------------------------------------------------------- /fas/static/images/balloons/balloon-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/balloon-1.png -------------------------------------------------------------------------------- /fas/static/images/balloons/balloon-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/balloon-2.png -------------------------------------------------------------------------------- /fas/static/images/balloons/balloon-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/images/balloons/balloon-3.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/account.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/approved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/approved.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/favicon.ico -------------------------------------------------------------------------------- /fas/static/theme/fas/images/head-dev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/head-dev.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/head-stg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/head-stg.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/infobar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/infobar.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/sidebar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/sidebar.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/success.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/warning.png -------------------------------------------------------------------------------- /fas/templates/group/dump.txt: -------------------------------------------------------------------------------- 1 | #for person in people 2 | ${person[0]},${person[1]},${person[2]},${person[3]},${person[4]} 3 | #end 4 | -------------------------------------------------------------------------------- /database/README: -------------------------------------------------------------------------------- 1 | This is a database migration repository. 2 | 3 | More information at 4 | http://code.google.com/p/sqlalchemy-migrate/ 5 | -------------------------------------------------------------------------------- /fas/static/theme/fas/images/footer-top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/footer-top.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/unapproved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/unapproved.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/footer-bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/footer-bottom.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/header_inner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/header_inner.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/icon_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/icon_warning.png -------------------------------------------------------------------------------- /plugins/fas-plugin-show/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include fas_show/__init__.py 2 | include fas_show/templates/*.html 3 | include fas_show/templates/*.py 4 | -------------------------------------------------------------------------------- /fas/static/theme/fas/images/icon_tool-item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/icon_tool-item.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/status_approved.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/status_approved.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/status_rejected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/status_rejected.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/topnav-separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/topnav-separator.png -------------------------------------------------------------------------------- /test.cfg: -------------------------------------------------------------------------------- 1 | # You can place test-specific configuration options here (like test db uri, etc) 2 | 3 | #sqlobject.dburi = "sqlite:///:memory:" 4 | 5 | -------------------------------------------------------------------------------- /fas/static/theme/fas/images/control-separator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/control-separator.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/status_incomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/status_incomplete.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/tg_under_the_hood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/tg_under_the_hood.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/header-icon_account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/header-icon_account.png -------------------------------------------------------------------------------- /fas/static/theme/fas/images/under_the_hood_blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/under_the_hood_blue.png -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include fas_asterisk/__init__.py 2 | include fas_asterisk/templates/*.html 3 | include fas_asterisk/templates/*.py 4 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include fas_bugzilla/__init__.py 2 | include fas_bugzilla/templates/*.html 3 | include fas_bugzilla/templates/*.py 4 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/README: -------------------------------------------------------------------------------- 1 | This is a database migration repository. 2 | 3 | More information at 4 | http://code.google.com/p/sqlalchemy-migrate/ 5 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include fas_yubikey/__init__.py 2 | include fas_yubikey/templates/*.html 3 | include fas_yubikey/templates/*.py 4 | -------------------------------------------------------------------------------- /.tx/config: -------------------------------------------------------------------------------- 1 | [main] 2 | host = https://www.transifex.net 3 | 4 | [fas.faspot] 5 | file_filter = po/.po 6 | source_file = po/fas.pot 7 | source_lang = en 8 | 9 | -------------------------------------------------------------------------------- /fas/static/theme/fas/images/gnome_audio_volume_medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fedora-infra/fas/HEAD/fas/static/theme/fas/images/gnome_audio_volume_medium.png -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/002_postgres_upgrade.sql: -------------------------------------------------------------------------------- 1 | grant all on table show_shows to group fedora; 2 | grant all on sequence show_shows_id_seq to group fedora; -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/002_postgres_downgrade.sql: -------------------------------------------------------------------------------- 1 | revoke all on table show_shows from group fedora; 2 | revoke all on sequence show_shows_id_seq from group fedora; -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/005_postgres_upgrade.sql: -------------------------------------------------------------------------------- 1 | grant all on table show_user_signups to group fedora; 2 | grant all on sequence show_user_signups_id_seq to group fedora; -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/005_postgres_downgrade.sql: -------------------------------------------------------------------------------- 1 | revoke all on table show_user_signups from group fedora; 2 | revoke all on sequence show_user_signups_id_seq from group fedora; -------------------------------------------------------------------------------- /fas/model/__init__.py: -------------------------------------------------------------------------------- 1 | # We want to import everything from both models into the same namespace (W0401) 2 | # pylint: disable-msg=W0401 3 | from fasmodel import * 4 | # pylint: enable-msg=W0401 5 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Note: Currently, this isn't read at all. 2 | # Contact ricky@fedoraproject.org to get your language enabled. 3 | bs 4 | cs 5 | de 6 | el 7 | es 8 | fa 9 | fr 10 | hu 11 | id 12 | it 13 | ja 14 | pl 15 | pt_BR 16 | ru 17 | zh_CN 18 | -------------------------------------------------------------------------------- /database/versions/NOTE: -------------------------------------------------------------------------------- 1 | FIX --> need to address the nullable column in 002_Add_people_privacy_column.py: 2 | 3 | Add the column without NOT NULL so all rows get a NULL value, UPDATE the column to set a value for all rows, then add the NOT NULL property to the column. This works for all column types. 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | random_seed 3 | pubring.gpg 4 | secring.gpg 5 | trustdb.gpg 6 | fas.log 7 | *.pyc 8 | *.pyo 9 | *.swp 10 | *.mo 11 | dist 12 | *.egg-info 13 | build 14 | gnupg 15 | locale 16 | ssl 17 | manage.py 18 | .project 19 | .pydevproject 20 | fas.cfg 21 | fas.anjuta 22 | .anjuta 23 | .anjuta_* 24 | .ropeproject 25 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/list.txt: -------------------------------------------------------------------------------- 1 | # group:description:type 2 | # Note: We might introduce another field, logged in user's status at the end 3 | # to match the html display at some point 4 | 5 | #for show in shows 6 | #with output=':'.join((show.name, show.long_name, show.owner)) 7 | ${output}:None 8 | #end 9 | #end 10 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | # Used for when working from a virtualenv. 2 | # Use this file by running "$ pip install -r requirements.txt" 3 | 4 | turbomail 5 | tg.devtools 6 | pygpgme 7 | SQLAlchemy 8 | Genshi 9 | psycopg2 10 | pytz 11 | Babel 12 | python-geoip 13 | python-openid 14 | python-memcached 15 | pyopenssl 16 | python-gettext 17 | pillow 18 | 19 | 20 | -------------------------------------------------------------------------------- /scripts/account-expiry.cfg: -------------------------------------------------------------------------------- 1 | [global] 2 | accounts_email = 'accounts@fedoraproject.org' 3 | whitelist = 'admin,fedoradummy,fedorasy,systems,transif' 4 | sqlalchemy.dburi = 'postgres://fedora:test@localhost/fas2' 5 | smtp_server = 'localhost' 6 | 7 | # Maximum password age (in days) 8 | max_age = 60 9 | # Password age at which warning email is sent (in days) 10 | warn_age = 53 11 | -------------------------------------------------------------------------------- /fas/templates/help.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${help[0]} 8 | 9 | 10 | ${XML(help[1])} 11 | 12 | 13 | -------------------------------------------------------------------------------- /pybabel.conf: -------------------------------------------------------------------------------- 1 | # Extraction from Python source files 2 | 3 | [python: **.py] 4 | 5 | # Extraction from Genshi HTML and text templates 6 | 7 | [genshi: **/templates/**.html] 8 | extract_text = False 9 | #ignore_tags = script,style 10 | #include_attrs = alt title summary 11 | 12 | #[genshi: **/templates/**.txt] 13 | #template_class = genshi.template:TextTemplate 14 | #extract_text = False 15 | #encoding = UTF-8 16 | 17 | -------------------------------------------------------------------------------- /fas/templates/group/list.txt: -------------------------------------------------------------------------------- 1 | # group:description:type:prerequisite 2 | # Note: We might introduce another field, logged in user's status at the end 3 | # to match the html display at some point 4 | 5 | #for group in groups 6 | #with output=':'.join((group.name, group.display_name, group.group_type)) 7 | #if group.prerequisite_id 8 | ${output}:${group.prerequisite.name} 9 | #end 10 | #if not group.prerequisite_id 11 | ${output}:None 12 | #end 13 | #end 14 | #end 15 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Things to Fix in FAS2 before declaring it done: 2 | 3 | * fasClient.py: Proper logging 4 | 5 | Nice-to-have things: 6 | * fas/group.py: Easy searching within groups (and sponsor/admin interface) 7 | 8 | * fas/aliases.py: An easy interface to manage mail aliases 9 | 10 | * setup.py: 11 | - Fix installing in all scenarios: bdist_egg, install, and 12 | install --install-data='/usr/share/fas' 13 | - Install fas.cfg 14 | - Install start-fas to the correct directory 15 | -------------------------------------------------------------------------------- /database/versions/003_Alter_groups_apply_rules_unicodetext.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Table, Column, MetaData, Text, UnicodeText 2 | 3 | def upgrade(migrate_engine): 4 | meta = MetaData(bind=migrate_engine) 5 | groups = Table('groups', meta, autoload=True) 6 | groups.c.apply_rules.alter(type=UnicodeText) 7 | 8 | def downgrade(): 9 | meta = MetaData(bind=migrate_engine) 10 | groups = Table('groups', meta, autoload=True) 11 | groups.c.apply_rules.alter(type=Text) 12 | -------------------------------------------------------------------------------- /fas/fedmsgshim.py: -------------------------------------------------------------------------------- 1 | """ This is a temporary shim that allows fedmsg to be an optional dependency of 2 | fas. If fedmsg is installed, these function calls will try to actually send 3 | messages. If it is not installed, it will return silently. 4 | 5 | :Author: Ralph Bean 6 | 7 | """ 8 | 9 | import warnings 10 | 11 | 12 | def send_message(*args, **kwargs): 13 | try: 14 | import fedmsg 15 | fedmsg.publish(*args, **kwargs) 16 | except Exception, e: 17 | warnings.warn(str(e)) 18 | -------------------------------------------------------------------------------- /fedmsg.d/ssl.py: -------------------------------------------------------------------------------- 1 | import os 2 | import socket 3 | 4 | SEP = os.path.sep 5 | here = os.getcwd() 6 | hostname = socket.gethostname() 7 | 8 | config = dict( 9 | sign_messages=True, 10 | validate_signatures=True, 11 | ssldir=SEP.join([here, 'dev_certs']), 12 | 13 | certnames={ 14 | hostname: "test_cert", 15 | # In prod/stg, map hostname to the name of the cert in ssldir. 16 | # Unfortunately, we can't use socket.getfqdn() 17 | #"app01.stg": "app01.stg.phx2.fedoraproject.org", 18 | }, 19 | ) 20 | -------------------------------------------------------------------------------- /database/versions/001_Add_groups_table.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Table, Column, Text, MetaData 2 | from sqlalchemy.exc import ProgrammingError 3 | 4 | meta = MetaData() 5 | 6 | groups = Table( 7 | 'groups', meta, 8 | Column("apply_rules", Text), 9 | ) 10 | 11 | def upgrade(migrate_engine): 12 | meta.bind = migrate_engine 13 | try: 14 | groups.create() 15 | except ProgrammingError: 16 | print "Table exists."; 17 | 18 | def downgrade(migrate_engine): 19 | meta.bind = migrate_engine 20 | groups.drop() 21 | -------------------------------------------------------------------------------- /fas/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | ${_('Login to the Fedora Accounts System')} 10 | 11 | 12 | 13 | ${message} 14 | 15 | 16 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/success.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Success')} 8 | 9 | 10 | 11 |

Success!

12 |

Return back to the sign up sheet

13 | 14 | 15 | -------------------------------------------------------------------------------- /start-fas: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -tt 2 | # -*- coding: utf-8 -*- 3 | '''Start script for the fas TurboGears project. 4 | 5 | This script is only needed during development for running from the project 6 | directory. When the project is installed, easy_install will create a 7 | proper start script. 8 | ''' 9 | __requires__='fas' 10 | __requires__='TurboGears' 11 | import sys 12 | from fas.commands import start, ConfigurationError 13 | 14 | if __name__ == '__main__': 15 | try: 16 | start() 17 | except ConfigurationError, exc: 18 | sys.stderr.write(str(exc)) 19 | sys.exit(1) 20 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/new-key.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | cd /tmp 4 | echo "Passed $1" >&2 5 | echo -n $(/srv/dev/fas/plugins/fas-plugin-yubikey/gen_yubikey.py $1 | /usr/bin/ykksm-import --verbose --database 'DBI:Pg:dbname=ykksm;host=localhost' --db-user ykksmimporter --db-passwd uTi2oabe | /usr/bin/awk -F, '/line/{ print $2,$3,$4 }') 6 | #echo -n $(/usr/bin/ykksm-gen-keys --urandom $1 $1 | /usr/bin/gpg --homedir=/srv/dev/gpg -a --encrypt -r 5ADA7BBA -s | /usr/bin/ykksm-import --verbose --database 'DBI:Pg:dbname=ykksm;host=localhost' --db-user ykksmimporter --db-passwd uTi2oabe | /usr/bin/awk -F, '/line/{ print $2,$3,$4 }') 7 | -------------------------------------------------------------------------------- /database/versions/002_Add_people_privacy_column.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Table, Boolean, Column, MetaData 2 | from sqlalchemy.exc import ProgrammingError 3 | 4 | def upgrade(migrate_engine): 5 | meta = MetaData(bind=migrate_engine) 6 | people = Table('people', meta, autoload=True) 7 | privacyc = Column("privacy", Boolean, default=False, nullable=False) 8 | try: 9 | privacyc.create(people) 10 | except ProgrammingError: 11 | print "Column exists." 12 | 13 | def downgrade(): 14 | meta = MetaData(bind=migrate_engine) 15 | people = Table('people', meta, autoload=True) 16 | people.c.privacy.drop() 17 | -------------------------------------------------------------------------------- /database/versions/004_Add_groups_invite_only_column.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import Table, Column, MetaData, Boolean 2 | from sqlalchemy.exc import ProgrammingError 3 | 4 | def upgrade(migrate_engine): 5 | meta = MetaData(bind=migrate_engine) 6 | groups = Table('groups', meta, autoload=True) 7 | invite_onlyc = Column('invite_only', Boolean, default=False) 8 | try: 9 | invite_onlyc.create(groups) 10 | except ProgrammingError: 11 | print "Column exists." 12 | 13 | def downgrade(migrate_engine): 14 | meta = MetaData(bind=migrate_engine) 15 | groups = Table('groups', meta, autoload=True) 16 | groups.c.invite_only.drop() 17 | -------------------------------------------------------------------------------- /fas/config/log.cfg: -------------------------------------------------------------------------------- 1 | # LOGGING 2 | # Logging is often deployment specific, but some handlers and 3 | # formatters can be defined here. 4 | 5 | [logging] 6 | [[formatters]] 7 | [[[message_only]]] 8 | format='*(asctime)s - *(message)s' 9 | 10 | [[[full_content]]] 11 | format='*(asctime)s *(name)s *(levelname)s *(message)s' 12 | 13 | [[handlers]] 14 | [[[debug_out]]] 15 | class='StreamHandler' 16 | level='DEBUG' 17 | args='(sys.stdout,)' 18 | formatter='full_content' 19 | 20 | [[[access_out]]] 21 | class='StreamHandler' 22 | level='INFO' 23 | args='(sys.stdout,)' 24 | formatter='message_only' 25 | 26 | [[[error_out]]] 27 | class='StreamHandler' 28 | level='ERROR' 29 | args='(sys.stdout,)' 30 | -------------------------------------------------------------------------------- /fedmsg.d/base.py: -------------------------------------------------------------------------------- 1 | config = dict( 2 | # Set this to dev if you're hacking on fedmsg or an app. 3 | # Set to stg or prod if running in the Fedora Infrastructure 4 | environment="dev", 5 | 6 | # Default is 0 7 | high_water_mark=0, 8 | io_threads=1, 9 | 10 | ## For the fedmsg-hub and fedmsg-relay. ## 11 | 12 | # We almost always want the fedmsg-hub to be sending messages with zmq as 13 | # opposed to amqp or stomp. 14 | zmq_enabled=True, 15 | 16 | # When subscribing to messages, we want to allow splats ('*') so we tell the 17 | # hub to not be strict when comparing messages topics to subscription 18 | # topics. 19 | zmq_strict=False, 20 | ) 21 | -------------------------------------------------------------------------------- /plugins/fas-plugin-dummy/fas_dummy/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Dummy Plugin!')} 12 | 13 | 14 | This is a dummy plugin! 15 |
16 | ${value} 17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Dummy Plugin!')} 12 | 13 | 14 | This is a dummy plugin! 15 |
16 | ${value} 17 | 18 | 19 | -------------------------------------------------------------------------------- /fas.conf.wsgi: -------------------------------------------------------------------------------- 1 | 2 | # File Start 3 | WSGISocketPrefix run/wsgi 4 | 5 | # Repress TG's stdoutput 6 | WSGIRestrictStdout On 7 | 8 | # TG implements its own signal handler. 9 | WSGIRestrictSignal Off 10 | 11 | # These are the real tunables 12 | #WSGIDaemonProcess daemon processes=2 threads=2 maximum-requests=1000 user=fas group=fas display-name=fas inactivity-timeout=30 13 | WSGIDaemonProcess fas processes=2 threads=2 maximum-requests=1000 user=fas display-name=fas inactivity-timeout=30 14 | WSGIPythonOptimize 1 15 | 16 | WSGIScriptAlias /accounts /usr/sbin/fas.wsgi/accounts 17 | 18 | 19 | WSGIProcessGroup fas 20 | Order deny,allow 21 | Allow from all 22 | 23 | 24 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/fail.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Failure')} 8 | 9 | 10 | 11 |

Failure!

12 |

Something has gone wrong. ${owner.fullname} is responsible for this booth. 13 | If you can not get help from an ambassador, please contact ${owner.fullname}

14 |

Return back to the sign up sheet

15 | 16 | 17 | -------------------------------------------------------------------------------- /fas/templates/error.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Fedora Accounts System')} 8 | 15 | 16 | 17 |

${_('Error!')}

18 |

${_('The following error(s) have occurred with your request:')}

19 |
    20 |
  • 21 | ${field}: ${error} 22 |
  • 23 |
24 | 25 | 26 | -------------------------------------------------------------------------------- /fas/templates/user/gencertdisabled.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | ${_('Certificate Generation Disabled')} 11 | 12 | 13 |

${_('Certificate Generation Disabled')}

14 |

15 | ${_('Generating SSL Certificates is disabled on this machine. If you were brought here by clicking a link it usually means there is a misconfiguration on the server. Please contact %(accts_email)s to fix things.') % {'accts_email': config.get('accounts_email')}} 16 |

17 | 18 | 19 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/script.py: -------------------------------------------------------------------------------- 1 | from sqlalchemy import * 2 | from migrate import * 3 | 4 | shows_table = Table('show_shows', metadata, 5 | Column('id', Integer, 6 | autoincrement=True, 7 | primary_key=True), 8 | Column('name', Text), 9 | Column('owner', Text), 10 | Column('group_id', Integer, 11 | ForeignKey('groups.id')), 12 | Column('long_name', Text)) 13 | 14 | 15 | def upgrade(): 16 | # Upgrade operations go here. Don't create your own engine; use the engine 17 | # named 'migrate_engine' imported from migrate. 18 | shows_table.create() 19 | pass 20 | 21 | def downgrade(): 22 | # Operations to reverse the above upgrade go here. 23 | shows_table.drop() 24 | pass 25 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include fas2.sql 2 | include README COPYING TODO NEWS HACKING INSTALL 3 | include *.cfg *.conf *.wsgi *.spec 4 | include fas.cfg.sample 5 | include fas.conf.wsgi 6 | include convert.py start-fas 7 | include client/*.conf 8 | include scripts/*.cfg 9 | include fas/config/* 10 | include fas/static/* 11 | include fas/static/images/balloons/* 12 | include fas/static/js/* 13 | include fas/static/theme/fas/css/* 14 | include fas/static/theme/fas/images/* 15 | include fas/templates/cla/*.html 16 | include fas/templates/cla/*.txt 17 | include fas/templates/fpca/*.html 18 | include fas/templates/fpca/*.txt 19 | include fas/templates/group/*.html 20 | include fas/templates/group/*.txt 21 | include fas/templates/user/*.html 22 | include fas/templates/user/*.txt 23 | include fas/templates/*.html 24 | include po/LINGUAS 25 | include po/*.po 26 | include po/*.pot 27 | include updates/* 28 | -------------------------------------------------------------------------------- /fas/tests/test_model.py: -------------------------------------------------------------------------------- 1 | # If your project uses a database, you can set up database tests 2 | # similar to what you see below. Be sure to set the db_uri to 3 | # an appropriate uri for your testing database. sqlite is a good 4 | # choice for testing, because you can use an in-memory database 5 | # which is very fast. 6 | 7 | from turbogears import testutil, database 8 | # from fas.model import YourDataClass, User 9 | 10 | # database.set_db_uri("sqlite:///:memory:") 11 | 12 | # class TestUser(testutil.DBTest): 13 | # def get_model(self): 14 | # return User 15 | # def test_creation(self): 16 | # "Object creation should set the name" 17 | # obj = User(user_name = "creosote", 18 | # email_address = "spam@python.not", 19 | # display_name = "Mr Creosote", 20 | # password = "Wafer-thin Mint") 21 | # assert obj.display_name == "Mr Creosote" 22 | 23 | -------------------------------------------------------------------------------- /fas/templates/user/verifyemail.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Confirm Email Change Request')} 8 | 9 | 10 |

${_('Confirm Email Change Request')}

11 |
12 |
13 |

14 | ${_('Do you really want to change your email to: %s?') % person.unverified_email} 15 |

16 | 17 | ${_('Cancel')} 18 |
19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /scripts/export-bugzilla.cfg: -------------------------------------------------------------------------------- 1 | [global] 2 | # bugzilla.url = https://bugdev.devel.redhat.com/bugzilla-cvs/xmlrpc.cgi 3 | bugzilla.url = "https://bugzilla.redhat.com/xmlrpc.cgi" 4 | #bugzilla.url = "https://bzprx.vip.phx.redhat.com/xmlrpc.cgi" 5 | bugzilla.username = "<%= bugzillaUser %>" 6 | bugzilla.password = "<%= bugzillaPassword %>" 7 | 8 | # Mail server for sending invalid bugzilla account messages 9 | mail.server = 'localhost' 10 | mail.admin_email = 'admin@fedoraproject.org' 11 | 12 | # This is a list (*must* have a comma) of email addresses to send messages about 13 | # invalid bugzilla accounts to. The strin '$USER' is special. If present in the 14 | # list, it will send an email to the user whose email address is not in bugzilla. 15 | mail.notify_email = 'admin@fedoraproject.org', 16 | 17 | # At the moment, we have to extract this information directly from the fas2 18 | # database. We can build a json interface for it at a later date. 19 | sqlalchemy.dburi = "postgres://fedora:bunbunbun@localhost/fas2" 20 | 21 | -------------------------------------------------------------------------------- /fas/sidebar.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from turbogears import identity 3 | 4 | # A list of functions to call to get the various entries that 5 | # should be shown in the sidebar 6 | entryfuncs = [] 7 | 8 | # Generator that returns each of the entries 9 | def getEntries(): 10 | for f in entryfuncs: 11 | entries = f() 12 | for entry in entries: 13 | yield entry 14 | 15 | 16 | # Stock entries used by FAS everywhere 17 | def stockentries(): 18 | entries = [] 19 | if not identity.current.anonymous and ( 20 | 'sysadmin' in identity.current.groups 21 | or 'accounts' in identity.current.groups 22 | ): 23 | entries.append((_('New Group'), '/group/new')) 24 | entries.append((_('User List'), '/user/list')) 25 | if not identity.current.anonymous: 26 | entries.append((_('Group List'), '/group/list/A*')) 27 | entries.append((_('Join a Group'), '/group/list/A*')) 28 | return entries 29 | 30 | entryfuncs.append(stockentries) 31 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/setup.py: -------------------------------------------------------------------------------- 1 | # Yubikey Plugin for FAS2 2 | __requires__='TurboGears >= 1.0.4' 3 | 4 | from setuptools import setup, find_packages 5 | from turbogears.finddata import find_package_data, standard_exclude, \ 6 | standard_exclude_directories 7 | import os, glob 8 | 9 | excludeFiles = [] 10 | excludeFiles.extend(standard_exclude) 11 | excludeDataDirs = [] 12 | excludeDataDirs.extend(standard_exclude_directories) 13 | 14 | package_data = find_package_data(where='fas_yubikey', package='fas_yubikey', exclude=excludeFiles, exclude_directories=excludeDataDirs,) 15 | 16 | setup( 17 | name = "fas-plugin-yubikey", 18 | version = "0.7", 19 | packages = find_packages(), 20 | 21 | package_data = package_data, 22 | 23 | author = "Mike McGrath", 24 | author_email = "mmcgrath@redhat.com", 25 | description = "Yubikey plugin for FAS2", 26 | entry_points = { 27 | 'fas.plugins': ( 28 | 'Yubikey = fas_yubikey:YubikeyPlugin', 29 | ) 30 | } 31 | ) 32 | -------------------------------------------------------------------------------- /fas/templates/user/gencert.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 10 | ${_('Certificate Generation')} 11 | 12 | 13 |

${_('Certificate Generation')}

14 |

15 | ${_('The link below allows you to generate a certificate to authenticate to Fedora\'s buildsytems. Please note that you can only have one valid certificate at any given time. Once you generate a new certificate, any previous ones are revoked. Currently, if you are not working on Fedora packaging, you will probably not need to have a certificate.')} 16 |

17 |

18 | ${_('Generate a certificate')} 19 |

20 | 21 | 22 | -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/setup.py: -------------------------------------------------------------------------------- 1 | # Asterisk Plugin for FAS2 2 | __requires__='TurboGears >= 1.0.4' 3 | 4 | from setuptools import setup, find_packages 5 | from turbogears.finddata import find_package_data, standard_exclude, \ 6 | standard_exclude_directories 7 | import os, glob 8 | 9 | excludeFiles = [] 10 | excludeFiles.extend(standard_exclude) 11 | excludeDataDirs = [] 12 | excludeDataDirs.extend(standard_exclude_directories) 13 | 14 | package_data = find_package_data(where='fas_asterisk', package='fas_asterisk', exclude=excludeFiles, exclude_directories=excludeDataDirs,) 15 | 16 | setup( 17 | name = "fas-plugin-asterisk", 18 | version = "0.6", 19 | packages = find_packages(), 20 | 21 | package_data = package_data, 22 | 23 | author = "Mike McGrath", 24 | author_email = "mmcgrath@redhat.com", 25 | description = "Asterisk plugin for FAS2", 26 | entry_points = { 27 | 'fas.plugins': ( 28 | 'Asterisk = fas_asterisk:AsteriskPlugin', 29 | ) 30 | } 31 | ) 32 | -------------------------------------------------------------------------------- /database/migrate.cfg: -------------------------------------------------------------------------------- 1 | [db_settings] 2 | # Used to identify which repository this database is versioned under. 3 | # You can use the name of your project. 4 | repository_id=FAS2 Database 5 | 6 | # The name of the database table used to track the schema version. 7 | # This name shouldn't already be used by your project. 8 | # If this is changed once a database is under version control, you'll need to 9 | # change the table name in each database too. 10 | version_table=migrate_version 11 | 12 | # When committing a change script, Migrate will attempt to generate the 13 | # sql for all supported databases; normally, if one of them fails - probably 14 | # because you don't have that database installed - it is ignored and the 15 | # commit continues, perhaps ending successfully. 16 | # Databases in this list MUST compile successfully during a commit, or the 17 | # entire commit will fail. List the databases your application will actually 18 | # be using to ensure your updates to that database work properly. 19 | # This must be a list; example: ['postgres','sqlite'] 20 | required_dbs=[] 21 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/migrate.cfg: -------------------------------------------------------------------------------- 1 | [db_settings] 2 | # Used to identify which repository this database is versioned under. 3 | # You can use the name of your project. 4 | repository_id=show 5 | 6 | # The name of the database table used to track the schema version. 7 | # This name shouldn't already be used by your project. 8 | # If this is changed once a database is under version control, you'll need to 9 | # change the table name in each database too. 10 | version_table=migrate_version 11 | 12 | # When committing a change script, Migrate will attempt to generate the 13 | # sql for all supported databases; normally, if one of them fails - probably 14 | # because you don't have that database installed - it is ignored and the 15 | # commit continues, perhaps ending successfully. 16 | # Databases in this list MUST compile successfully during a commit, or the 17 | # entire commit will fail. List the databases your application will actually 18 | # be using to ensure your updates to that database work properly. 19 | # This must be a list; example: ['postgres','sqlite'] 20 | required_dbs=[] 21 | -------------------------------------------------------------------------------- /updates/fas2-0.13.1_to_0.14.0.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2016 Patrick Uiterwijk 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Patrick Uiterwijk 17 | 18 | ALTER TABLE people ADD COLUMN ipa_sync_status TEXT; 19 | -------------------------------------------------------------------------------- /fas/templates/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Welcome to FAS2')} 8 | 15 | 16 | 17 |

18 | ${Markup(_('Welcome to the Fedora Accounts System. Please submit bugs to <a href="https://fedorahosted.org/fas/">https://fedorahosted.org/fas/</a> or stop by #fedora-admin on irc.freenode.net.'))} 19 |

20 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /fas/templates/group/apply.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | ${_('Apply to Group')} 9 | 10 | 11 | 12 | 17 |

${group.display_name} (${group.name})

18 |

${_('Group Rules')}

19 |

The administrator for this group has set a few rules. There may be tasks you need to do before you can join. They are as follows

20 |

${group.apply_rules}

21 |

Have you read all the rules, and followed all instructions?

22 |
23 |
24 | 25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /updates/fas2-0.10.0_to_0.11.0.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2016 Patrick Uiterwijk 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Patrick Uiterwijk 17 | 18 | CREATE TABLE captchanonce ( 19 | nonce VARCHAR(32) PRIMARY KEY NOT NULL, 20 | used TIMESTAMP WITH TIME ZONE DEFAULT NOW() 21 | ); 22 | -------------------------------------------------------------------------------- /updates/fas2-0.8.4_to_0.8.5.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2008 Red Hat, Inc. 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Toshio Kuratomi 17 | -- 18 | 19 | -- Add new constraints to the database 20 | alter table configs add unique (person_id, application, attribute); 21 | alter table configs ALTER COLUMN person_id set not null; 22 | -------------------------------------------------------------------------------- /plugins/fas-plugin-dummy/setup.py: -------------------------------------------------------------------------------- 1 | # Dummy Plugin for FAS2 2 | __requires__='TurboGears >= 1.0.4' 3 | 4 | from setuptools import setup, find_packages 5 | from turbogears.finddata import find_package_data, standard_exclude, \ 6 | standard_exclude_directories 7 | import os, glob 8 | 9 | excludeFiles = ['*.cfg.in'] 10 | excludeFiles.extend(standard_exclude) 11 | excludeDataDirs = [''] 12 | excludeDataDirs.extend(standard_exclude_directories) 13 | 14 | package_data = find_package_data(where='./', package='fas_dummy', exclude=excludeFiles, exclude_directories=excludeDataDirs,) 15 | data_files = [('__init__.py', filter(os.path.isfile, glob.glob('__init__.py'))), 16 | ('templates', filter(os.path.isfile, glob.glob('templates/*html'))) 17 | ] 18 | setup( 19 | name = "fas-plugin-dummy", 20 | version = "0.1", 21 | packages = find_packages(), 22 | 23 | data_files = data_files, 24 | package_data = package_data, 25 | 26 | author = "Mike McGrath", 27 | author_email = "mmcgrath@redhat.com", 28 | description = "Sample plugin for FAS2", 29 | entry_points = { 30 | 'fas.plugins': ( 31 | 'Dummy = fas_dummy:DummyPlugin', 32 | ) 33 | } 34 | ) 35 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/setup.py: -------------------------------------------------------------------------------- 1 | # Show Plugin for FAS2 2 | __requires__='TurboGears >= 1.0.4' 3 | 4 | from setuptools import setup, find_packages 5 | from turbogears.finddata import find_package_data, standard_exclude, \ 6 | standard_exclude_directories 7 | import os, glob 8 | 9 | excludeFiles = ['*.cfg.in'] 10 | excludeFiles.extend(standard_exclude) 11 | excludeDataDirs = [''] 12 | excludeDataDirs.extend(standard_exclude_directories) 13 | 14 | package_data = find_package_data(where='./', package='fas_show', exclude=excludeFiles, exclude_directories=excludeDataDirs,) 15 | data_files = [('__init__.py', filter(os.path.isfile, glob.glob('__init__.py'))), 16 | ('templates', filter(os.path.isfile, glob.glob('templates/*html'))) 17 | ] 18 | setup( 19 | name = "fas-plugin-show", 20 | version = "0.1", 21 | packages = find_packages(), 22 | 23 | data_files = data_files, 24 | package_data = package_data, 25 | 26 | author = "Yaakov M Nemoy", 27 | author_email = "loupgaroublond@gmail.com", 28 | description = "Show plugin for FAS2", 29 | entry_points = { 30 | 'fas.plugins': ( 31 | 'Show = fas_show:ShowPlugin', 32 | ) 33 | } 34 | ) 35 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/fas_bugzilla/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Bugzilla Email Address')} 12 | 13 | 14 |

${_('Notice: If your bugzilla email address is:')} ${ person.email } ${_('Please do not change this.')}

15 |

${_('Notice: Your current bugzilla address is set to: ')} ${ configs['bugzilla_email'] }

16 |
17 |
18 |

19 | ${_('Change My Bugzilla Address')}  20 | 21 |

22 | 23 | 24 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/setup.py: -------------------------------------------------------------------------------- 1 | # Bugzilla Plugin for FAS2 2 | __requires__='TurboGears >= 1.0.4' 3 | 4 | from setuptools import setup, find_packages 5 | from turbogears.finddata import find_package_data, standard_exclude, \ 6 | standard_exclude_directories 7 | import os, glob 8 | 9 | excludeFiles = [] 10 | excludeFiles.extend(standard_exclude) 11 | excludeDataDirs = [] 12 | excludeDataDirs.extend(standard_exclude_directories) 13 | 14 | package_data = find_package_data(where='fas_bugzilla', package='fas_bugzilla', exclude=excludeFiles, exclude_directories=excludeDataDirs,) 15 | data_files = [('__init__.py', filter(os.path.isfile, glob.glob('__init__.py'))), 16 | ('templates', filter(os.path.isfile, glob.glob('templates/*html'))) 17 | ] 18 | 19 | setup( 20 | name = "fas-plugin-bugzilla", 21 | version = "0.3", 22 | packages = find_packages(), 23 | 24 | data_files = data_files, 25 | package_data = package_data, 26 | 27 | author = "Mike McGrath", 28 | author_email = "mmcgrath@redhat.com", 29 | description = "Bugzilla plugin for FAS2", 30 | entry_points = { 31 | 'fas.plugins': ( 32 | 'Bugzilla = fas_bugzilla:BugzillaPlugin', 33 | ) 34 | } 35 | ) 36 | -------------------------------------------------------------------------------- /fas/templates/user/resetpass.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Reset Password')} 8 | 9 | 10 |

${_('Reset Password')}

11 |
12 |
    13 |
    14 |
    15 | 19 |
    20 |
21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /fas/templates/search-box.html: -------------------------------------------------------------------------------- 1 | 2 | 6 |
7 |
8 |

${_('"*" is a wildcard (Ex: "git*")')}

9 |
10 | 11 | 12 |
13 |
14 |

${_('Results')}

15 | 19 |
20 |
21 |

${_('Types')}

22 | 26 |
27 | 28 | -------------------------------------------------------------------------------- /updates/fas2-0.9.0_to_0.10.0.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2013 Xavier Lamien 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Xavier Lamien 17 | 18 | 19 | -- Please, make sure group name matches the one you entered in fas.cfg 20 | NSERT INTO groups (name, display_name, owner_id, group_type) VALUES ('accounts-moderators', 'Accounts System Moderators', (SELECT id from people where username='admin'), 'cla'); 21 | -------------------------------------------------------------------------------- /fas/templates/user/verifypass.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Reset Password')} 8 | 9 | 10 |

${_('Reset Password')}

11 |

${_('Pick a password or phrase that is long but memorable. Use a mix of upper and lowercase letters as well as numbers and punctuation.')}

12 |
13 |
    14 |
    15 |
    16 |
    17 | 18 | ${_('Cancel')} 19 |
    20 |
21 |
22 | 23 | 24 | -------------------------------------------------------------------------------- /fedmsg.d/endpoints.py: -------------------------------------------------------------------------------- 1 | import socket 2 | hostname = socket.gethostname() 3 | 4 | config = dict( 5 | # This is a dict of possible addresses from which fedmsg can send 6 | # messages. fedmsg.init(...) requires that a 'name' argument be passed 7 | # to it which corresponds with one of the keys in this dict. 8 | endpoints={ 9 | # This is the output side of the relay to which all other 10 | # services can listen. 11 | "relay_outbound": ["tcp://*:4001"], 12 | 13 | # For other, more 'normal' services, fedmsg will try to guess the 14 | # name of it's calling module to determine which endpoint definition 15 | # to use. This can be overridden by explicitly providing the name in 16 | # the initial call to fedmsg.init(...). 17 | "fas.%s" % hostname: ["tcp://*:3002"], 18 | }, 19 | 20 | # This is the address of an active->passive relay. It is used for the 21 | # fedmsg-logger command which requires another service with a stable 22 | # listening address for it to send messages to. 23 | # It is also used by the git-hook, for the same reason. 24 | # It is also used by the mediawiki php plugin which, due to the oddities of 25 | # php, can't maintain a single passive-bind endpoint of it's own. 26 | relay_inbound="tcp://127.0.0.1:2003", 27 | ) 28 | -------------------------------------------------------------------------------- /updates/fas2-0.11.0_to_0.12.0.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2016 Patrick Uiterwijk 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Patrick Uiterwijk 17 | 18 | ALTER TABLE people DROP CONSTRAINT IF EXISTS people_status_check1; 19 | ALTER TABLE people ADD CONSTRAINT people_status_check1 CHECK (status IN ('active', 'inactive', 'expired', 'admin_disabled', 'bot', 'spamcheck_awaiting', 'spamcheck_manual', 'spamcheck_denied')); 20 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/fas_bugzilla/templates/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Edit Bugzilla Settings')} 12 | 13 | 14 |

${_('Editing (%s)') % target.username}

15 |
16 |
17 | 18 | 19 | 20 |
21 |
22 | 23 | ${_('Cancel')} 24 |
25 |
26 | 27 | 28 | -------------------------------------------------------------------------------- /fas/tests/test_controllers.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | import turbogears 3 | from turbogears import testutil 4 | from fas.controllers import Root 5 | import cherrypy 6 | 7 | cherrypy.root = Root() 8 | 9 | class TestPages(unittest.TestCase): 10 | 11 | def setUp(self): 12 | turbogears.startup.startTurboGears() 13 | 14 | def tearDown(self): 15 | """Tests for apps using identity need to stop CP/TG after each test to 16 | stop the VisitManager thread. 17 | See http://trac.turbogears.org/turbogears/ticket/1217 for details. 18 | """ 19 | turbogears.startup.stopTurboGears() 20 | 21 | def test_method(self): 22 | "the index method should return a string called now" 23 | import types 24 | result = testutil.call(cherrypy.root.index) 25 | assert type(result["now"]) == types.StringType 26 | 27 | def test_indextitle(self): 28 | "The indexpage should have the right title" 29 | testutil.createRequest("/") 30 | response = cherrypy.response.body[0].lower() 31 | assert "welcome to turbogears" in response 32 | 33 | def test_logintitle(self): 34 | "login page should have the right title" 35 | testutil.createRequest("/login") 36 | response = cherrypy.response.body[0].lower() 37 | assert "login" in response 38 | -------------------------------------------------------------------------------- /updates/fas2-0.8.14_to_0.8.14.90.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2012 Patrick Uiterwijk 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Patrick Uiterwijk 17 | -- Pierre-Yves Chibon 18 | 19 | -- Add columns for the security question and answer 20 | ALTER TABLE people ADD COLUMN security_question TEXT NOT NULL DEFAULT '-'; 21 | ALTER TABLE people ADD COLUMN security_answer TEXT NOT NULL DEFAULT '-'; 22 | ALTER TABLE people ADD COLUMN blog_rss TEXT; 23 | ALTER TABLE people ADD COLUMN blog_avatar TEXT; 24 | -------------------------------------------------------------------------------- /plugins/fas-plugin-bugzilla/fas-plugin-bugzilla.spec: -------------------------------------------------------------------------------- 1 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 2 | 3 | Name: fas-plugin-bugzilla 4 | Version: 0.1 5 | Release: 1%{?dist} 6 | Summary: bugzilla plugin for FAS2 7 | 8 | Group: Development/Languages 9 | License: GPLv2 10 | URL: https://fedorahosted.org/fas/ 11 | Source0: fas-plugin-bugzilla-%{version}.tar.gz 12 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) 13 | 14 | BuildArch: noarch 15 | BuildRequires: python-devel TurboGears 16 | %if 0%{?fedora} >= 8 17 | BuildRequires: python-setuptools-devel 18 | %else 19 | BuildRequires: python-setuptools 20 | %endif 21 | #BuildRequires: fas 22 | Requires: fas >= 0.8.4.2 23 | 24 | %description 25 | bugzilla plugin for FAS2 26 | 27 | %prep 28 | %setup -q 29 | 30 | 31 | %build 32 | %{__python} setup.py build 33 | 34 | 35 | %install 36 | %{__rm} -rf %{buildroot} 37 | %{__python} setup.py install --skip-build --root %{buildroot} 38 | 39 | 40 | %clean 41 | %{__rm} -rf %{buildroot} 42 | 43 | 44 | %files 45 | %defattr(-,root,root,-) 46 | #%doc docs/* 47 | %{python_sitelib}/fas_bugzilla 48 | %{python_sitelib}/*.egg-info 49 | 50 | 51 | %changelog 52 | * Wed Oct 14 2009 Mike McGrath 0.6-1 53 | - Initial packaging 54 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/list.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | ${_('Show List')} 10 | 11 | 12 | 16 | 17 |

Create New Show

18 | Create a Show 19 |
20 | 21 |

${_('List (%s)') % search}

22 |

${_('Search Shows')}

23 | ${search_box('/show/list')} 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
${_('Show')}${_('Description')}${_('Sign Ups')}
${show.name}${show.long_name}${len(show.user_signups)}
41 | 42 | 43 | -------------------------------------------------------------------------------- /updates/fas2-0.8.7_to_0.8.8.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2011 Red Hat, Inc. 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Toshio Kuratomi 17 | 18 | 19 | -- Add the cla_fpca group to phase out the fedora_cla group 20 | insert into groups (name, display_name, owner_id, group_type, invite_only, url) values ('cla_fpca', 'Signers of the Fedora Project Contributor Agreement', 100001, 'cla', true, 'http://fedoraproject.org/wiki/Legal:Fedora_Project_Contributor_Agreement'); 21 | 22 | -- Change schema so that the group_type is mandatory 23 | alter table groups ALTER COLUMN group_type set not null; 24 | -------------------------------------------------------------------------------- /fas/lib/gpg.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2012 Patrick Uiterwijk 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Patrick Uiterwijk 19 | import os 20 | import io 21 | import gpgme 22 | 23 | def encrypt_text(receiver, text): 24 | plaintext = io.BytesIO(text.encode("UTF-8")) 25 | ciphertext = io.BytesIO() 26 | ctx = gpgme.Context() 27 | ctx.armor = True 28 | recipient = ctx.get_key(receiver) 29 | ctx.encrypt([recipient], gpgme.ENCRYPT_ALWAYS_TRUST, 30 | plaintext, ciphertext) 31 | ciphertext.seek(0) 32 | return ciphertext.getvalue().replace('\\\\n', '\n') 33 | -------------------------------------------------------------------------------- /fas/static/fedora-upload-ca.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIID9zCCA2CgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBtDELMAkGA1UEBhMCVVMx 3 | FzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRAwDgYDVQQHEwdSYWxlaWdoMRcwFQYD 4 | VQQKEw5GZWRvcmEgUHJvamVjdDEVMBMGA1UECxMMVXBsb2FkIEZpbGVzMR4wHAYD 5 | VQQDExVjdnMuZmVkb3JhLnJlZGhhdC5jb20xKjAoBgkqhkiG9w0BCQEWG3dlYm1h 6 | c3RlckBmZWRvcmEucmVkaGF0LmNvbTAeFw0wNTA0MDUwNDA1MjhaFw0yNDEyMjEw 7 | NDA1MjhaMIG0MQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmEx 8 | EDAOBgNVBAcTB1JhbGVpZ2gxFzAVBgNVBAoTDkZlZG9yYSBQcm9qZWN0MRUwEwYD 9 | VQQLEwxVcGxvYWQgRmlsZXMxHjAcBgNVBAMTFWN2cy5mZWRvcmEucmVkaGF0LmNv 10 | bTEqMCgGCSqGSIb3DQEJARYbd2VibWFzdGVyQGZlZG9yYS5yZWRoYXQuY29tMIGf 11 | MA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChj2IMGZhlNQSYbG0niJkBoX082JZm 12 | +XGSVsfmIn0yX/RuBiKc4J9iXRZdEcvkXtmisBewN8S+t1scB5NcRLZr8HhMGZAV 13 | KIUXIRq0DkDqyNGdZBV5cs0DD77f/SnF2RoR/MaHs4xcg7HOkM5/upcubJ4awCMo 14 | CWVWrSPqHbMOnQIDAQABo4IBFTCCAREwHQYDVR0OBBYEFCi5aT3PdyUlwur5ECGs 15 | sprjT/HTMIHhBgNVHSMEgdkwgdaAFCi5aT3PdyUlwur5ECGssprjT/HToYG6pIG3 16 | MIG0MQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExEDAOBgNV 17 | BAcTB1JhbGVpZ2gxFzAVBgNVBAoTDkZlZG9yYSBQcm9qZWN0MRUwEwYDVQQLEwxV 18 | cGxvYWQgRmlsZXMxHjAcBgNVBAMTFWN2cy5mZWRvcmEucmVkaGF0LmNvbTEqMCgG 19 | CSqGSIb3DQEJARYbd2VibWFzdGVyQGZlZG9yYS5yZWRoYXQuY29tggEAMAwGA1Ud 20 | EwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAX9ugTUs4AKQpEsrjX4DlUQTuwiuh 21 | dnBOrFRJqC5vB1Q2ER+w34/7E14wbYvqAGLSZzHQ8lS1o2KA4vN4bRP6SgFzuoFs 22 | jdigP4on50NXnUq0mmGATbp/hpYbAc6vqvAPI08OH9tGXjKjExHj9A8JgqkZym3X 23 | QhzIfMrGDdIip6k= 24 | -----END CERTIFICATE----- 25 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/gen_yubikey.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import time, string, sys 4 | from random import choice 5 | 6 | try: 7 | key_num = int(sys.argv[1]) 8 | except IndexError: 9 | print "Please give a key id (usually the users uid)" 10 | sys.exit(2) 11 | 12 | def hex2modhex (string): 13 | ''' Convert a hex string to a modified hex string ''' 14 | replacement = { '0': 'c', 15 | '1': 'b', 16 | '2': 'd', 17 | '3': 'e', 18 | '4': 'f', 19 | '5': 'g', 20 | '6': 'h', 21 | '7': 'i', 22 | '8': 'j', 23 | '9': 'k', 24 | 'a': 'l', 25 | 'b': 'n', 26 | 'c': 'r', 27 | 'd': 't', 28 | 'e': 'u', 29 | 'f': 'v' } 30 | new_string = '' 31 | for letter in string: 32 | new_string = new_string + replacement[letter] 33 | return new_string 34 | 35 | def gethexrand(length): 36 | return ''.join([choice('0123456789abcdef') for i in range(length)]).lower() 37 | 38 | now = time.strftime("%Y-%m-%dT%H:%M:%S") 39 | print "# ykksm 1" 40 | print "# serialnr,identity,internaluid,aeskey,lockpw,created,accessed[,progflags]" 41 | hexctr = "%012x" % key_num 42 | modhexctr = hex2modhex(hexctr) 43 | internaluid = gethexrand(12) 44 | aeskey = gethexrand(32) 45 | lockpw = gethexrand(12) 46 | print "%s,%s,%s,%s,%s,%s," % (key_num, modhexctr, internaluid, aeskey, lockpw, now) 47 | -------------------------------------------------------------------------------- /updates/fas2-0.8.9.1_to_0.9.0.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2013 Pierre-Yves Chibon 2 | -- 3 | -- This copyrighted material is made available to anyone wishing to use, modify, 4 | -- copy, or redistribute it subject to the terms and conditions of the GNU 5 | -- General Public License v.2. This program is distributed in the hope that it 6 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 7 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 8 | -- See the GNU General Public License for more details. You should have 9 | -- received a copy of the GNU General Public License along with this program; 10 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 11 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 12 | -- incorporated in the source code or documentation are not subject to the GNU 13 | -- General Public License and may only be used or replicated with the express 14 | -- permission of Red Hat, Inc. 15 | -- 16 | -- Author(s): Pierre-Yves Chibon 17 | 18 | -- Update the group.group_type to include the type 'pkgdb'. 19 | 20 | -- Here we assume the name is 'groups_group_type_check' -- Might have to be 21 | -- checked as we did not name the constraint. 22 | ALTER TABLE groups 23 | DROP CONSTRAINT groups_group_type_check; 24 | 25 | -- Set the name of the new constraint. 26 | ALTER TABLE groups 27 | ADD CONSTRAINT groups_group_type_check CHECK (group_type in ('cla', 'system', 28 | 'bugzilla','cvs', 'bzr', 'git', 'hg', 'mtn', 'svn', 'shell', 'torrent', 29 | 'tracker', 'tracking', 'user', 'pkgdb')); 30 | 31 | -------------------------------------------------------------------------------- /fas/templates/user/changequestion.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Change Security Question')} 8 | 9 | 10 |

${_('Change Security Question')}

11 |
12 |

${_('Please enter your current password for confirmation, and then choose a new security question and answer.')}

13 |

${_('This question will be asked if you lose access to your email address and want to recover access to your account.')}

14 |
    15 |
    16 |
    17 | 18 | 19 | 20 |
    21 |
    22 |
    23 |
24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /plugins/fas-plugin-dummy/fas_dummy/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import turbogears 3 | from turbogears import controllers, expose, paginate, identity, redirect, widgets, validate, validators, error_handler 4 | from turbogears.database import session 5 | 6 | import cherrypy 7 | 8 | from genshi.template.plugin import TextTemplateEnginePlugin 9 | 10 | import fas.sidebar as sidebar 11 | import logging 12 | import fas.plugin as plugin 13 | 14 | class DummyPlugin(controllers.Controller): 15 | capabilities = ['dummy_plugin'] 16 | 17 | def __init__(self): 18 | '''Create a Dummy Controller.''' 19 | self.path = '' 20 | 21 | @expose(template="fas_dummy.templates.index") 22 | def index(self): 23 | value = "my Val" 24 | return dict(value=value) 25 | 26 | @classmethod 27 | def initPlugin(cls, controller): 28 | cls.log = logging.getLogger('plugin.dummy') 29 | cls.log.info('Dummy plugin initializing') 30 | try: 31 | path, self = controller.requestpath(cls, '/dummy') 32 | cls.log.info('Dummy plugin hooked') 33 | self.path = path 34 | if self.sidebarentries not in sidebar.entryfuncs: 35 | sidebar.entryfuncs.append(self.sidebarentries) 36 | except (plugin.BadPathException, 37 | plugin.PathUnavailableException), e: 38 | cls.log.info('Dummy plugin hook failure: %s' % e) 39 | 40 | def delPlugin(self, controller): 41 | self.log.info('Dummy plugin shutting down') 42 | if self.sidebarentries in sidebar.entryfuncs: 43 | sidebar.entryfuncs.remove(self.sidebarentries) 44 | 45 | def sidebarentries(self): 46 | return [('Dummy plugin', self.path)] 47 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/fas-plugin-yubikey.spec: -------------------------------------------------------------------------------- 1 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 2 | 3 | Name: fas-plugin-yubikey 4 | Version: 0.8 5 | Release: 2%{?dist} 6 | Summary: Yubikey plugin for FAS2 7 | 8 | Group: Development/Languages 9 | License: GPLv2 10 | URL: https://fedorahosted.org/fas/ 11 | Source0: fas-plugin-yubikey-%{version}.tar.xz 12 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) 13 | 14 | BuildArch: noarch 15 | BuildRequires: python-devel TurboGears 16 | %if 0%{?fedora} >= 8 17 | BuildRequires: python-setuptools-devel 18 | %else 19 | BuildRequires: python-setuptools 20 | %endif 21 | #BuildRequires: fas 22 | Requires: fas >= 0.8.4.5 23 | 24 | %description 25 | Yubikey plugin for FAS2 26 | 27 | %prep 28 | %setup -q -c 29 | 30 | 31 | %build 32 | %{__python} setup.py build 33 | 34 | 35 | %install 36 | %{__rm} -rf %{buildroot} 37 | %{__python} setup.py install --skip-build --root %{buildroot} 38 | 39 | 40 | %clean 41 | %{__rm} -rf %{buildroot} 42 | 43 | 44 | %files 45 | %defattr(-,root,root,-) 46 | #%doc docs/* 47 | %{python_sitelib}/fas_yubikey 48 | %{python_sitelib}/*.egg-info 49 | 50 | 51 | %changelog 52 | * Mon Jan 26 2015 Xavier Lamien - 0.8-2 53 | - New upstream release. 54 | - Add fedmsg notifications. 55 | 56 | * Sun Jan 30 2011 Jon Stanley - 0.7-1 57 | - New upstream release 58 | 59 | * Fri Sep 24 2010 Mike McGrath - 0.2-1 60 | - New upstream release 61 | 62 | * Mon May 11 2009 Mike McGrath - 0.1-1 63 | - Initial RPM Package. 64 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/006_add_description_to_shows.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Red Hat, Inc. 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Yaakov Nemoy 19 | # 20 | 21 | from sqlalchemy import Table, MetaData, Text, Column 22 | from migrate import migrate_engine 23 | from migrate.changeset import create_column, drop_column 24 | 25 | metadata = MetaData(migrate_engine) 26 | shows_table = Table('show_shows', metadata, autoload=True) 27 | 28 | description = Column('description', Text) 29 | 30 | def upgrade(): 31 | # Upgrade operations go here. Don't create your own engine; use the engine 32 | # named 'migrate_engine' imported from migrate. 33 | create_column(description, shows_table) 34 | 35 | def downgrade(): 36 | # Operations to reverse the above upgrade go here. 37 | drop_column(description, shows_table) 38 | -------------------------------------------------------------------------------- /fas/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Fedora Accounts System')} 8 | 9 | 10 | 13 |

${_('To do queue:')}

14 |
    15 |
  • ${Markup(_('FPCA not completed. To become a full Fedora Contributor please <a href="%s">complete the FPCA</a>.') % tg.url('/fpca/'))}
  • 16 |
  • ${Markup(_('You have not submitted an SSH key, some Fedora resources require an SSH key. Please submit yours by editing <a href="%s">My Account</a>') % tg.url('/user/edit'))}
  • 17 |
18 | 19 | 20 |
    21 |
  • 22 | ${Markup(_('<strong><a href="%(userview)s">%(user)s (%(email)s)</a></strong> requests approval to join <a href="%(groupview)s">%(group)s</a>.') % 23 | {'userview': tg.url('/user/view/%s') % role.member.username, 24 | 'groupview': tg.url('/group/view/%s') % group.name, 25 | 'user': role.member.username, 26 | 'email': role.member.email, 27 | 'group': group.name})} 28 |
  • 29 |
30 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /fas/templates/user/list.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Users List')} 8 | 9 | 10 |

${_('List (%s)') % search}

11 |
12 |

${_('"*" is a wildcard (Ex: "ric*")')}

13 |
14 | 15 | 16 |
17 |
18 |

${_('Results')}

19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | 38 | 39 | 42 | 43 | 44 |
${_('Username')}${_('Account Status')}
${person.username} 34 | ${_('CLA Done')} 35 |
${person.username} 40 | ${_('Not Done')} 41 |
45 | 46 | 47 | -------------------------------------------------------------------------------- /fas/templates/group/invite.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Invite a new community member!')} 8 | 9 | 10 | 18 |

${_('Invite a new community member!')}

19 |
20 |
21 | ${_('Language:')} 22 |
28 |
29 | ${_('To email:')}
30 |
31 | ${_('From:')} ${person.email}
32 | ${_('Subject:')} ${invite_subject}
33 | ${_('Message:')}

${invite_text}


34 |
35 | 36 |
37 |
38 | 39 | 40 | -------------------------------------------------------------------------------- /fas/release.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Ricky Zhou 4 | # Copyright © 2014 Red Hat, Inc. 5 | # 6 | # This copyrighted material is made available to anyone wishing to use, modify, 7 | # copy, or redistribute it subject to the terms and conditions of the GNU 8 | # General Public License v.2. This program is distributed in the hope that it 9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. You should have 12 | # received a copy of the GNU General Public License along with this program; 13 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 14 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 15 | # incorporated in the source code or documentation are not subject to the GNU 16 | # General Public License and may only be used or replicated with the express 17 | # permission of Red Hat, Inc. 18 | # 19 | # Author(s): Ricky Zhou 20 | # Mike McGrath 21 | # Toshio Kuratomi 22 | # Patrick Uiterwijk 23 | # 24 | ''' 25 | Release information about the Fedora Accounts System 26 | ''' 27 | 28 | VERSION = '0.14.1' 29 | NAME = 'fas' 30 | DESCRIPTION = 'The Fedora Account System' 31 | LONG_DESCRIPTION = ''' 32 | Manage the accounts of contributors to the Fedora Project. 33 | ''' 34 | AUTHOR = 'Ricky Zhou, Mike McGrath, Toshio Kuratomi Patrick Uiterwijk, and Yaakov Nemoy' 35 | EMAIL = 'fedora-infrastructure-list@fedoraproject.org' 36 | COPYRIGHT = '2007-2016 Red Hat, Inc.' 37 | 38 | # if it's open source, you might want to specify these 39 | URL = 'https://admin.fedoraproject.org/accounts/' 40 | DOWNLOAD_URL = 'https://fas2.fedorahosted.org/' 41 | LICENSE = 'GPLv2' 42 | -------------------------------------------------------------------------------- /fas/static/fedora-server-ca.cert: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFDDCCA/SgAwIBAgIJAIXPTSFIAGQuMA0GCSqGSIb3DQEBBAUAMIG0MQswCQYD 3 | VQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xpbmExDzANBgNVBAcTBkR1cmhh 4 | bTEWMBQGA1UEChMNRmVkb3JhIEV4dHJhczEWMBQGA1UECxMNQnVpbGQgc3lzdGVt 5 | czEgMB4GA1UEAxMXZXh0cmFzNjQubGludXguZHVrZS5lZHUxKTAnBgkqhkiG9w0B 6 | CQEWGmJ1aWxkc3lzQGZlZG9yYXByb2plY3Qub3JnMB4XDTA1MDcxMDA1MzMyMFoX 7 | DTE1MDcwODA1MzMyMFowgbQxCzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBD 8 | YXJvbGluYTEPMA0GA1UEBxMGRHVyaGFtMRYwFAYDVQQKEw1GZWRvcmEgRXh0cmFz 9 | MRYwFAYDVQQLEw1CdWlsZCBzeXN0ZW1zMSAwHgYDVQQDExdleHRyYXM2NC5saW51 10 | eC5kdWtlLmVkdTEpMCcGCSqGSIb3DQEJARYaYnVpbGRzeXNAZmVkb3JhcHJvamVj 11 | dC5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDDFIgpujE9hcHx 12 | cMl55Zbhp4jzUFcmhzy38WEI86y39FWjSTnhfKES/S96mh73h3lmK+ZSG1UJCJWP 13 | rF+ILoH7AzPYgzYPt/e71jwkw3p3J74RYArV2ANslkJjJ1xyavYjyTLJbshFXvho 14 | eZnjsJ4lZCYE8KdxJR8QzDtZCWNehbCTqN9af8Uu7YVcKjxGSpe4T5tHVao+nIbk 15 | 4OisWxlnPvRmpiia1K6wlEM4MNiaGcsuyxUg5PDFiqgfaqXZD+PEVpVNhmG/W2uQ 16 | PezVZhuozWjPfj16IkOPEYTrix4EyamWWn8KwPr1X6aptCgJuvUB4Xl/xGMijcmz 17 | 7E7yAz1/AgMBAAGjggEdMIIBGTAdBgNVHQ4EFgQUmHrD/b5vfP+aIxManLn8z3xx 18 | whowgekGA1UdIwSB4TCB3oAUmHrD/b5vfP+aIxManLn8z3xxwhqhgbqkgbcwgbQx 19 | CzAJBgNVBAYTAlVTMRcwFQYDVQQIEw5Ob3J0aCBDYXJvbGluYTEPMA0GA1UEBxMG 20 | RHVyaGFtMRYwFAYDVQQKEw1GZWRvcmEgRXh0cmFzMRYwFAYDVQQLEw1CdWlsZCBz 21 | eXN0ZW1zMSAwHgYDVQQDExdleHRyYXM2NC5saW51eC5kdWtlLmVkdTEpMCcGCSqG 22 | SIb3DQEJARYaYnVpbGRzeXNAZmVkb3JhcHJvamVjdC5vcmeCCQCFz00hSABkLjAM 23 | BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4IBAQBPpTtBkQJOrf9DEyv//kyr 24 | dPLePw7iNr0G9UAaNat/A7r23PLjekzOwNzp82Wt5NgepRCQJ11wjdCIzyIbIh2f 25 | uUMR5SG4TxzjJapt8jmJFZ97qhku6Tvbvh1INcdHJtmIkoKTJFm6UNEriDR5gArW 26 | 8rFcO76fJbOgFk6M+ZDVFO7dfSIaghrUq7uIGyk380jquVjifIa3ewxQaKkSzslk 27 | +Yfd5IIKYqX9IrDolPUp9OaG9SJ/FzxJA9fkYaRbe4tUibHK2sNYdiJbLO1Xb6mF 28 | JsHMcHv8xx9t2oFmmWrmpzBotQBje5B2HOKcIWIiiC6OFkWxt1kpwwHqv1WXFbUW 29 | -----END CERTIFICATE----- 30 | -------------------------------------------------------------------------------- /updates/fas2-0.8.3_to_0.8.4.sql: -------------------------------------------------------------------------------- 1 | -- Copyright © 2008 Red Hat, Inc. 2 | -- Copyright © 2008 Ricky Zhou 3 | -- Copyright © 2008 Xavier Lamien 4 | -- 5 | -- This copyrighted material is made available to anyone wishing to use, modify, 6 | -- copy, or redistribute it subject to the terms and conditions of the GNU 7 | -- General Public License v.2. This program is distributed in the hope that it 8 | -- will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | -- implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | -- See the GNU General Public License for more details. You should have 11 | -- received a copy of the GNU General Public License along with this program; 12 | -- if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | -- Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | -- incorporated in the source code or documentation are not subject to the GNU 15 | -- General Public License and may only be used or replicated with the express 16 | -- permission of Red Hat, Inc. 17 | -- 18 | -- Author(s): Ricky Zhou, Xavier Lamien, Toshio Kuratomi 19 | -- 20 | -- 21 | 22 | -- Add new column to table 23 | ALTER TABLE groups add column url TEXT; 24 | ALTER TABLE groups add column mailing_list TEXT; 25 | ALTER TABLE groups add column mailing_list_url TEXT; 26 | ALTER TABLE groups add column irc_channel TEXT; 27 | ALTER TABLE groups add column irc_network TEXT; 28 | 29 | -- Add new column to table 30 | ALTER TABLE people add column country_code CHAR(2); 31 | 32 | 33 | -- Add View for mod_auth_pgsql 34 | CREATE VIEW user_group AS SELECT username, name AS groupname FROM people AS p, groups AS g, person_roles AS r WHERE r.person_id=p.id AND r.group_id=g.id AND r.role_status='approved'; 35 | 36 | 37 | -- Add new TuboGears session table 38 | 39 | CREATE TABLE session (id VARCHAR(40) primary key, data text, expiration_time timestamp); 40 | 41 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/fas_yubikey/templates/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Edit Yubikey Settings')} 12 | 13 | 14 |

${_('Edit Yubikey for (%s)') % target.username}

15 |
16 |
17 | 18 | 22 | 23 |
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 | 32 | ${_('Cancel')} 33 |
34 |
35 | 36 | 37 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/view.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('View Show')} 8 | 9 | 10 | 11 | 19 |

${show.long_name} (${show.name})

20 |

${_('Owner:')} ${show.owner.username}

21 |

Show Details 22 | ${_('(edit)')} 23 |

24 |
25 |
26 |
${_('Name:')}
${show.long_name} 
27 |
${_('Description:')}
${show.description}
28 |
${_('Owner:')}
${show.owner.human_name}
29 |
${_('Team:')}
${group.display_name}
30 |
31 |
32 |

Sign Up!

33 |

Signed up people

34 |

Total: ${len(show.user_signups)}

35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 |
${_('User Name:')}${_('Real Name:')}
${person.human_name}${person.human_name}
49 | 50 | 51 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/join.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Welcome to %s!') % show.long_name} 8 | 9 | 10 |

${_('Welcome to %s!') % show.long_name}

11 |

${_('Enter your name in this form, and register yourself in our system.')} 12 | ${_('Our Ambassador team will be able to get in contact with you after the show.')}

13 |
14 |
15 | 16 | 17 |
18 |
19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 | 30 | 31 | 32 |
33 |
34 | 35 |
36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/fas-plugin-asterisk.spec: -------------------------------------------------------------------------------- 1 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 2 | 3 | Name: fas-plugin-asterisk 4 | Version: 0.7 5 | Release: 1%{?dist} 6 | Summary: Asterisk plugin for FAS2 7 | 8 | Group: Development/Languages 9 | License: GPLv2 10 | URL: https://fedorahosted.org/fas/ 11 | Source0: fas-plugin-asterisk-%{version}.tar.gz 12 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) 13 | 14 | BuildArch: noarch 15 | BuildRequires: python-devel TurboGears 16 | %if 0%{?fedora} >= 8 17 | BuildRequires: python-setuptools-devel 18 | %else 19 | BuildRequires: python-setuptools 20 | %endif 21 | #BuildRequires: fas 22 | Requires: fas >= 0.8.4.2 23 | 24 | %description 25 | Asterisk plugin for FAS2 26 | 27 | %prep 28 | %setup -q 29 | 30 | 31 | %build 32 | %{__python} setup.py build 33 | 34 | 35 | %install 36 | %{__rm} -rf %{buildroot} 37 | %{__python} setup.py install --skip-build --root %{buildroot} 38 | 39 | 40 | %clean 41 | %{__rm} -rf %{buildroot} 42 | 43 | 44 | %files 45 | %defattr(-,root,root,-) 46 | #%doc docs/* 47 | %{python_sitelib}/fas_asterisk 48 | %{python_sitelib}/*.egg-info 49 | 50 | 51 | %changelog 52 | * Fri Aug 27 2010 Mike McGrath - 0.7-1 53 | - Getting another release ready 54 | 55 | * Mon Feb 16 2009 Ricky Zhou -0.6-1 56 | - Allow systems users to get this info. 57 | 58 | * Mon Feb 16 2009 Ricky Zhou -0.5-1 59 | - Actually fix PIN security issue. 60 | 61 | * Mon Feb 16 2009 Ricky Zhou -0.4-1 62 | - Fix PIN security issue. 63 | 64 | * Mon Jun 16 2008 Ricky Zhou -0.3-1 65 | - Bugfix. 66 | 67 | * Mon Jun 16 2008 Mike McGrath -0.2-1 68 | - Upstream released version 69 | - Renamed package name 70 | - Added TurboGears as a build req 71 | 72 | * Mon Jun 16 2008 Ricky Zhou - 0.1-1 73 | - Initial RPM Package. 74 | -------------------------------------------------------------------------------- /fas/templates/user/changepass.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Change Password')} 8 | 9 | 10 |

${_('Change Password')}

11 |
12 |

${_('Passphrases need to be of a certain complexity to prevent attackers from guessing it by having a computer try different combinations of characters in rapid succession. To make such brute force attacks harder we enforce some minimum levels of strength:')}

13 |
    14 |
  • ${_('A passphrase with symbols, upper and lowercase letters, and digits must be at least 9 characters')}
  • 15 |
  • ${_('A passphrase with upper and lowercase letters and digits must be at least 10 characters')}
  • 16 |
  • ${_('A passphrase with lowercase letters and digits must be at least 12 characters')}
  • 17 |
  • ${_('A passphrase with letters alone must be made of at least 3 different characters and be at least 20 characters long')}
  • 18 |
19 |

${_('Remember that these are minimum levels. You are encouraged to make your passphrases longer and more complex than the minimum values.')}

20 |
    21 |
    22 |
    23 |
    24 |
    25 |
26 |
27 | 28 | 29 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/004_join_people_to_shows.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Red Hat, Inc. 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Yaakov Nemoy 19 | # 20 | 21 | from sqlalchemy import MetaData, Table, Column, Integer, ForeignKey 22 | from migrate import migrate_engine 23 | 24 | metadata = MetaData(migrate_engine) 25 | 26 | shows_table = Table('show_shows', metadata, autoload=True) 27 | PeopleTable = Table('people', metadata, autoload=True) 28 | 29 | user_signups_table = \ 30 | Table('show_user_signups', metadata, 31 | Column('id', Integer, 32 | autoincrement=True, 33 | primary_key=True), 34 | Column('show_id', Integer, 35 | ForeignKey('show_shows.id')), 36 | Column('people_id', Integer, 37 | ForeignKey('people.id'), 38 | unique=True)) 39 | 40 | def upgrade(): 41 | # Upgrade operations go here. Don't create your own engine; use the engine 42 | # named 'migrate_engine' imported from migrate. 43 | user_signups_table.create() 44 | 45 | def downgrade(): 46 | # Operations to reverse the above upgrade go here. 47 | user_signups_table.drop() 48 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/001_create.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Red Hat, Inc. 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Yaakov Nemoy 19 | # 20 | 21 | from sqlalchemy import * 22 | from migrate import * 23 | from migrate.changeset import * 24 | 25 | metadata = MetaData(migrate_engine) 26 | 27 | shows_table = Table('show_shows', metadata, 28 | Column('id', Integer, 29 | autoincrement=True, 30 | primary_key=True), 31 | Column('name', Text), 32 | Column('owner', Text), 33 | Column('group_id', Integer), 34 | Column('long_name', Text)) 35 | 36 | GroupsTable = Table('groups', metadata, autoload=True) 37 | 38 | shows_group_fk = ForeignKeyConstraint([shows_table.c.group_id], 39 | [GroupsTable.c.id]) 40 | 41 | 42 | def upgrade(): 43 | # Upgrade operations go here. Don't create your own engine; use the engine 44 | # named 'migrate_engine' imported from migrate. 45 | shows_table.create() 46 | shows_group_fk.create() 47 | 48 | def downgrade(): 49 | # Operations to reverse the above upgrade go here. 50 | shows_group_fk.drop() 51 | shows_table.drop() 52 | -------------------------------------------------------------------------------- /fas/feeds.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ''' Provides feeds interface to FAS ''' 3 | # 4 | # Copyright © 2008 Ricky Zhou 5 | # Copyright © 2014 Red Hat, Inc. 6 | # 7 | # This copyrighted material is made available to anyone wishing to use, modify, 8 | # copy, or redistribute it subject to the terms and conditions of the GNU 9 | # General Public License v.2. This program is distributed in the hope that it 10 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 11 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 | # See the GNU General Public License for more details. You should have 13 | # received a copy of the GNU General Public License along with this program; 14 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 15 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 16 | # incorporated in the source code or documentation are not subject to the GNU 17 | # General Public License and may only be used or replicated with the express 18 | # permission of Red Hat, Inc. 19 | # 20 | # Author(s): Ricky Zhou 21 | # Mike McGrath 22 | # 23 | import urllib 24 | from xml.dom import minidom 25 | 26 | 27 | class Koji: 28 | ''' Provide fas feeds for koji ''' 29 | def __init__(self, user_name, 30 | url='http://publictest8/koji/recentbuilds?user='): 31 | build_feed = minidom.parse(urllib.urlopen(url + user_name)) 32 | try: 33 | self.user_link = build_feed.getElementsByTagName( 34 | 'link')[0].childNodes[0].data 35 | self.builds = {} 36 | for build in build_feed.getElementsByTagName('item'): 37 | link = build.getElementsByTagName('link')[0].childNodes[0].data 38 | self.builds[link] = {} 39 | self.builds[link]['title'] = build.getElementsByTagName( 40 | 'title')[0].childNodes[0].data 41 | self.builds[link]['pubDate'] = build.getElementsByTagName( 42 | 'pubDate')[0].childNodes[0].data 43 | except IndexError: 44 | return 45 | -------------------------------------------------------------------------------- /fas/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Ricky Zhou 4 | # Copyright © 2014 Red Hat, Inc. 5 | # 6 | # This copyrighted material is made available to anyone wishing to use, modify, 7 | # copy, or redistribute it subject to the terms and conditions of the GNU 8 | # General Public License v.2. This program is distributed in the hope that it 9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. You should have 12 | # received a copy of the GNU General Public License along with this program; 13 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 14 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 15 | # incorporated in the source code or documentation are not subject to the GNU 16 | # General Public License and may only be used or replicated with the express 17 | # permission of Red Hat, Inc. 18 | # 19 | # Author(s): Ricky Zhou 20 | # Mike McGrath 21 | # 22 | from fas import release 23 | __version__ = release.VERSION 24 | 25 | import gettext 26 | translation = gettext.translation('fas', '/usr/share/locale', 27 | fallback=True) 28 | _ = translation.ugettext 29 | 30 | SHARE_CC_GROUP = 'share_country_code' 31 | SHARE_LOC_GROUP = 'share_location' 32 | 33 | class FASError(Exception): 34 | '''FAS Error''' 35 | pass 36 | 37 | class ApplyError(FASError): 38 | '''Raised when a user could not apply to a group''' 39 | pass 40 | 41 | class ApproveError(FASError): 42 | '''Raised when a user could not be approved in a group''' 43 | pass 44 | 45 | class SponsorError(FASError): 46 | '''Raised when a user could not be sponsored in a group''' 47 | pass 48 | 49 | class UpgradeError(FASError): 50 | '''Raised when a user could not be upgraded in a group''' 51 | pass 52 | 53 | class DowngradeError(FASError): 54 | '''Raised when a user could not be downgraded in a group''' 55 | pass 56 | 57 | class RemoveError(FASError): 58 | '''Raised when a user could not be removed from a group''' 59 | pass 60 | -------------------------------------------------------------------------------- /ca/Makefile: -------------------------------------------------------------------------------- 1 | # $Id: Makefile,v 1.4 2006/06/20 18:55:37 jmates Exp $ 2 | # 3 | # NOTE If running OpenSSL 0.9.8a or higher, see -newkey, below. 4 | # 5 | # Automates the setup of a custom Certificate Authority and provides 6 | # routines for signing and revocation of certificates. To use, first 7 | # customize the commands in this file and the settings in openssl.cnf, 8 | # then run: 9 | # 10 | # make init 11 | # 12 | # Then, copy in certificate signing requests, and ensure their suffix is 13 | # .csr before signing them with the following command: 14 | # 15 | # make sign 16 | # 17 | # To revoke a key, name the certificate file with the cert option 18 | # as shown below: 19 | # 20 | # make revoke cert=foo.cert 21 | # 22 | # This will revoke the certificate and call gencrl; the revocation list 23 | # will then need to be copied somehow to the various systems that use 24 | # your CA cert. 25 | 26 | requests = *.csr 27 | 28 | # remove -batch option if want chance to not certify a particular request 29 | sign: FORCE 30 | @openssl ca -batch -config openssl.cnf -in $(req) -out $(cert) 31 | 32 | revoke: 33 | @test $${cert:?"usage: make revoke cert=certificate"} 34 | @openssl ca -config openssl.cnf -revoke $(cert) 35 | @$(MAKE) gencrl 36 | 37 | gencrl: 38 | @openssl ca -config openssl.cnf -gencrl -out ca-crl.pem 39 | 40 | clean: 41 | -rm ${requests} 42 | 43 | # creates required supporting files, CA key and certificate 44 | init: 45 | @test ! -f serial 46 | @mkdir crl newcerts private 47 | @chmod go-rwx private 48 | @echo '01' > serial 49 | @touch index 50 | # NOTE use "-newkey rsa:2048" if running OpenSSL 0.9.8a or higher 51 | @openssl req -nodes -config openssl.cnf -days 1825 -x509 -newkey rsa:2048 -out ca-cert.pem -outform PEM 52 | 53 | help: 54 | @echo make sign req=in.csr cert=out.cert 55 | @echo ' - signs in.csr, outputting to out.cert' 56 | @echo 57 | @echo make revoke cert=filename 58 | @echo ' - revokes certificate in named file and calls gencrl' 59 | @echo 60 | @echo make gencrl 61 | @echo ' - updates Certificate Revocation List (CRL)' 62 | @echo 63 | @echo make clean 64 | @echo ' - removes all *.csr files in this directory' 65 | @echo 66 | @echo make init 67 | @echo ' - required initial setup command for new CA' 68 | 69 | # for legacy make support 70 | FORCE: 71 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/new.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Create a new Show Event')} 8 | 9 | 10 |

${_('Create a new Show Event')}

11 |
12 |
13 | 14 | 15 | 16 |
17 |
18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 |
37 |
38 | 39 |
40 |
41 | 42 | 43 | -------------------------------------------------------------------------------- /fas/templates/about.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('About FAS')} 8 | 9 | 10 |

${_('FAS - The Open Account System')}

11 |

${_('''FAS is designed around an open architecture. Unlike the traditional account systems where a single admin or group of admins decide who gets to be in what group, FAS is completely designed to be self operating per team. Every group is given at least one administrator who can then approve other people in the group. Also, unlike traditional account systems. FAS allows people to apply for the groups they want to be in. This paradigm is interesting as it allows anyone to find out who is in what groups and contact them. This openness is brought over from the same philosophies that make Open Source popular.''')}

12 |

${_('Etiquette')}

13 |

${_("People shouldn't assume that by applying for a group that they're then in that group. Consider it like applying for another job. It often takes time. For best odds of success, learn about the group you're applying for and get to know someone in the group. Find someone with sponsor or admin access and ask them if they'd have time to mentor you. Plan on spending at least a few days learning about the group, doing a mundane task, participating on the mailing list. Sometimes this process can take weeks depending on the group. It's best to know you will get sponsored before you apply.")}

14 |

${_('Users, Sponsors, Administrators')}

15 |

${_('''Once you're in the group, you're in the group. Sponsorship and Administrators typically have special access in the group in questions. Some groups consider sponsorship level to be of a higher involvement, partial ownership of the group for example. But as far as the account system goes the distinction is easy. Sponsors can approve new users and make people into sponsors. They cannot, however, downgrade or remove other sponsors. They also cannot change administrators in any way. Administrators can do anything to anyone in the group.''')}

16 | 17 | 18 | -------------------------------------------------------------------------------- /fas/lib/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2012 Patrick Uiterwijk 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Patrick Uiterwijk 19 | # 20 | 21 | import cherrypy 22 | import time 23 | from turbogears import config 24 | import requests 25 | 26 | 27 | def recursive_str(dct): 28 | """ This function makes sure that dct is json serializable. """ 29 | if not hasattr(dct, '__iter__'): 30 | return str(dct) 31 | for key in dct: 32 | if isinstance(dct[key], dict): 33 | dct[key] = recursive_str(dct[key]) 34 | elif isinstance(dct[key], list): 35 | dct[key] = map(recursive_str, dct[key]) 36 | elif isinstance(dct[key], unicode): 37 | dct[key] = str(dct[key].encode('utf-8')) 38 | else: 39 | # If it's not a dict or list, just run an str() over it 40 | dct[key] = str(dct[key]) 41 | return dct 42 | 43 | def submit_to_spamcheck(action, data): 44 | """ This function submits to spamcheck. Caller is responsible for catching errors.""" 45 | submit_data = recursive_str(data) 46 | submit_data['request_headers'] = cherrypy.request.headers 47 | return requests.post(config.get('antispam.api.url'), 48 | auth=(config.get('antispam.api.username'), 49 | config.get('antispam.api.password')), 50 | json={'action': action, 51 | 'time': int(time.time()), 52 | 'data': submit_data}) 53 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/templates/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Edit %s') % show.name} 8 | 9 | 10 |

${_('Edit %s') % show.name}

11 |
12 |
13 | 14 | 15 | 16 |
17 |
18 | 19 | 20 | 21 |
22 |
23 | 24 | 25 | 26 |
27 |
28 | 29 | 30 | 31 |
32 |
33 | 34 | 35 | 36 |
37 |
38 | 39 | ${_("Cancel")} 40 |
41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/fas_show/help.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Ricky Zhou 4 | # Copyright © 2008 Red Hat, Inc. 5 | # 6 | # This copyrighted material is made available to anyone wishing to use, modify, 7 | # copy, or redistribute it subject to the terms and conditions of the GNU 8 | # General Public License v.2. This program is distributed in the hope that it 9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. You should have 12 | # received a copy of the GNU General Public License along with this program; 13 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 14 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 15 | # incorporated in the source code or documentation are not subject to the GNU 16 | # General Public License and may only be used or replicated with the express 17 | # permission of Red Hat, Inc. 18 | # 19 | # Author(s): Ricky Zhou 20 | # Mike McGrath 21 | # Yaakov Nemoy 22 | # 23 | import turbogears 24 | from turbogears import controllers, expose 25 | 26 | class Help(controllers.Controller): 27 | help = dict(none=[_('Error'), _('

We could not find that help item

')], 28 | show_name=[_('Show Name'), _('''

A short name to identify the show, perhaps a code name. Include a date or unique number.

''')], 29 | show_display_name=[_('Show Display Name'), _('''

A longer user readable name to describe the show. Preferably the canonical name provided by the event organizers

''')], 30 | show_owner=[_('Show Owner'), _('''

The user name of the owner of the event

''')], 31 | group=[_('Show Group'),_('''

The name of the group of the participants in the event

''')], 32 | description=[_('Description'), _('''

Be descriptive

''')]) 33 | 34 | def __init__(self): 35 | '''Create a JsonRequest Controller.''' 36 | 37 | @expose(template="fas.templates.help") 38 | def get_help(self, helpid='none'): 39 | try: 40 | helpItem = self.help[helpid] 41 | except KeyError: 42 | return dict(title=_('Error'), helpItem=[_('Error'), _('

We could not find that help item

')]) 43 | return dict(help=helpItem) 44 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/fas_yubikey/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Yubikey')} 12 | 13 | 14 |

${_('Yubikey Settings')} ${_('(edit)')}

15 |
16 |
17 |
${_('Yubikey Enabled')}
18 |
19 | ${_('Disabled')} 20 |   21 |
22 |
23 | ${_('Enabled')} 24 |   25 |
26 |
27 |
28 |
${_('Yubikey prefix:')}
29 |
${configs['prefix']} 30 |   31 |
32 |
33 |
34 |
${_('Test Auth:')}
35 |
36 |
37 |   38 | 39 |
40 |
41 |
42 |

${_('What are yubikeys?')}

43 |

${_('Yubikeys are a hardware key built and sold by')} yubico. ${_('In the Fedora Project, these keys are only used by Fedora system administrators: ')} 44 | ${_('Fedora Wiki YubiKey documentation')}

45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/README: -------------------------------------------------------------------------------- 1 | Notes on yubikey setup. 2 | 3 | This plugin requires a yubikey-ksm and a yubikey val server. This plugin talks 4 | with the val server, the val server talks with the yubikey-ksm 5 | 6 | yubikey -> FAS -> yubi-val-server -> yubi-ksm 7 | 8 | You can use the public yubikey server if you want. 9 | 10 | =========== 11 | Installation 12 | =========== 13 | 14 | First install yubikey-ksm and yubikey-val. These are the directions for postgres. Mysql and others should work but are not tested / documented. 15 | 16 | Create the yubikey-ksm database 17 | $ sudo su - postgres 18 | $ createdb ykksm 19 | $ psql ykksm < /usr/share/doc/yubikey-ksm-1.3/ykksm-db.sql 20 | $ psql ykksm 21 | ykksm=# CREATE USER ykksmimporter PASSWORD 'mypass'; 22 | ykksm=# GRANT INSERT,UPDATE,DELETE,SELECT ON yubikeys TO ykksmimporter; 23 | ykksm=# CREATE USER ykksmreader PASSWORD 'mypass'; 24 | ykksm=# GRANT SELECT ON yubikeys TO reader; 25 | 26 | Note, ykksmimporter is going to be used by fas turbogears configs, ykksmreader will be used by the yubikey-ksm app 27 | 28 | 29 | Next create the yubikey-val database 30 | 31 | $ sudo su - postgres 32 | $ createdb ykval 33 | $ psql ykval < /usr/share/doc/yubikey-val-2.6/ykval-db.sql 34 | $ psql ykval 35 | ykval=# CREATE USER ykval_verifier PASSWORD 'mypass'; 36 | ykval=# GRANT SELECT,INSERT,UPDATE,DELETE ON yubikeys TO ykval_verifier; 37 | ykval=# GRANT SELECT ON clients TO ykval_verifier; 38 | ykval=# GRANT SELECT, INSERT, UPDATE, DELETE ON queue TO ykval_verifier; 39 | 40 | 41 | Next, alter your config files: 42 | 43 | /etc/ykksm/ykksm-config: use the ykksmreader username and password 44 | /etc/ykksm/ykval-config: Use the ykval_verifier username and password. 45 | Also have the return array() at the bottom point to localhost 46 | Comment out the __YKVAL_SYNC_POOL__ and __YKVAL_ALLOWED_SYNC_POOL__ sections 47 | /etc/fas.cfg: Add ykksm_db="postgres://ykksmimporter:yourpass@localhost/ykksm" 48 | ykval_db="postgres://ykval_verifier:yourpass@localhost/ykval" 49 | 50 | 51 | By default the ykksm is exposed at http://localhost/yk-ksm?otp= 52 | By default the ykval is exposed at http://localhost/yk-val/verify?client_id=1&otp= 53 | 54 | Last just insert a client into the ykval database that you will use: 55 | 56 | $ sudo su - postgres 57 | $ psql ykval 58 | ykval=# insert into clients (id, created) VALUES (1, 1); 59 | 60 | 61 | =========== 62 | Burn key 63 | =========== 64 | 65 | Simply run the burnkey script provided, it will burn a key. 66 | -------------------------------------------------------------------------------- /fas/templates/group/list.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | ${_('Groups List')} 10 | 11 | 12 | 16 | 17 |

${_('Create New Group')}

18 | ${_('Create Group')} 19 |
20 | 21 |

${_('Group List (%s)') % search}

22 |

Fedora Account System groups are used to assign roles and permissions in the Fedora Project.

23 |

${_('Search Groups')}

24 | 25 | ${search_box('/group/list')} 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 48 | 49 | 50 |
${_('Group')}${_('Description')}${_('Group Type')}${_('Prerequisite')}${_('Status')}
${group.name}${group.display_name}${group.group_type}${group.prerequisite.name}${_('None')} 41 | 42 | ${_('Approved')} 43 | ${_('Unapproved')} 44 | 45 | ${_('Apply')} 46 | 47 |
51 | 52 | 53 | -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/fas_asterisk/templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('VoIP')} 12 | 13 | 14 |

${_('VoIP Settings')} ${_('(edit)')}

15 |
16 |
17 |
${_('Extension:')}
18 |
${'5%06d' % person.id} 19 |   20 |
21 |
${_('VoIP Active:')}
22 |
23 | Disabled 24 |   25 |
26 |
27 | Enabled 28 |   29 |
30 |
${_('VoIP Password:')}
${configs['pass']} 31 |   32 |
33 |
${_('SIP Address:')}
sip:${person.username}@fedoraproject.org 34 |   35 |
36 |
${_('Voicemail:')}
Enabled 37 |   38 |
39 |
${_('SMS Notification:')}
Not Yet Available 40 |   41 |
42 |
43 |
44 | 45 | 46 | -------------------------------------------------------------------------------- /plugins/fas-plugin-show/show/versions/003_change_owner_to_id.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Red Hat, Inc. 4 | # 5 | # This copyrighted material is made available to anyone wishing to use, modify, 6 | # copy, or redistribute it subject to the terms and conditions of the GNU 7 | # General Public License v.2. This program is distributed in the hope that it 8 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 9 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 10 | # See the GNU General Public License for more details. You should have 11 | # received a copy of the GNU General Public License along with this program; 12 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 13 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 14 | # incorporated in the source code or documentation are not subject to the GNU 15 | # General Public License and may only be used or replicated with the express 16 | # permission of Red Hat, Inc. 17 | # 18 | # Author(s): Yaakov Nemoy 19 | # 20 | 21 | from sqlalchemy import * 22 | from migrate import * 23 | from migrate.changeset.schema import * 24 | import pdb 25 | 26 | metadata = MetaData(migrate_engine) 27 | 28 | owner = Column('owner', Text) 29 | owner_id = Column('owner_id', Integer) 30 | 31 | shows_table = Table('show_shows', metadata, autoload=True) 32 | 33 | PeopleTable = Table('people', metadata, autoload=True) 34 | 35 | def upgrade(): 36 | # Upgrade operations go here. Don't create your own engine; use the engine 37 | # named 'migrate_engine' imported from migrate. 38 | create_column(owner_id, shows_table) 39 | 40 | owners = select([shows_table.c.id, shows_table.c.owner, 41 | PeopleTable.c.id], 42 | shows_table.c.owner==PeopleTable.c.username).execute() 43 | for x in owners: 44 | shows_table.update(shows_table.c.id==x[0], values=dict(owner_id=x[2])).execute() 45 | 46 | drop_column(owner, shows_table) 47 | pass 48 | 49 | def downgrade(): 50 | # Operations to reverse the above upgrade go here. 51 | create_column(owner, shows_table) 52 | 53 | owners = select([shows_table.c.id, shows_table.c.owner_id, 54 | PeopleTable.c.username], 55 | shows_table.c.owner_id==PeopleTable.c.id).execute() 56 | for x in owners: 57 | shows_table.update(shows_table.c.id==x[0], values=dict(owner=x[2])).execute() 58 | 59 | drop_column(owner_id, shows_table) 60 | pass 61 | -------------------------------------------------------------------------------- /fas/templates/group/members.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | ${_('View Group Members')} 11 | 12 | 13 | 14 | 21 |

${group.display_name} (${group.name})

22 |

23 | ${_('My Status:')} 24 | ${_('Approved')} 25 | ${_('Unapproved')} 26 | ${_('Not a Member')} 27 |

28 |
29 |
30 | 31 | 32 |
33 |
34 | ${_('Remove me')} 35 | 36 | 41 |

${_('Group Details')}

42 | ${types('/group/members/%s/%s' % (group.name, search), [('administrator', _('administrator')), ('sponsor', _('sponsor')), ('user', _('user'))])} 43 | ${search_box('/group/members/%s' % group.name)} 44 |

${_('Members')}

45 | ${member_table(members, group, person)} 46 | 47 | 48 | -------------------------------------------------------------------------------- /plugins/fas-plugin-asterisk/fas_asterisk/templates/edit.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 9 | 10 | 11 | ${_('Edit Asterisk Settings')} 12 | 13 | 14 |

${_('Edit Asterisk for (%s)') % target.username}

15 |
16 |
17 | 18 | 22 | 23 |
24 |
25 | 26 | 27 | 28 |
29 |
30 | 31 | 34 | 35 |
36 |
37 | 38 | 39 | 40 |
41 | 42 |
43 | 44 | ${_('Cancel')} 45 |
46 |
47 | 48 | 49 | -------------------------------------------------------------------------------- /client/restricted-shell: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python -tt 2 | # This script allows people to run the commands listed in 'commands' and 3 | # 'commands' only. Be careful though, by adding /bin/bash you've effectively 4 | # disabled this script. Also, via some voodoo you can restrict what flags 5 | # get passed or even completely alter what would normally happen if a command 6 | # were envoked (see scp section below) 7 | 8 | # TODO: better documentation needed for how this file works 9 | 10 | 11 | import sys, os 12 | 13 | commands = { 14 | "git-receive-pack": "/usr/bin/git-receive-pack", 15 | "git-upload-pack": "/usr/bin/git-upload-pack", 16 | "bzr": "/usr/bin/run-bzr", 17 | "hg": "/usr/bin/run-hg", 18 | "mtn": "/usr/bin/run-mtn", 19 | "svnserve": "/usr/bin/run-svnserve", 20 | "scp": "/usr/bin/scp", 21 | } 22 | 23 | if __name__ == '__main__': 24 | orig_cmd = os.environ.get('SSH_ORIGINAL_COMMAND') 25 | if not orig_cmd: 26 | print "Need a command" 27 | sys.exit(1) 28 | allargs = orig_cmd.split() 29 | try: 30 | basecmd = os.path.basename(allargs[0]) 31 | cmd = commands[basecmd] 32 | except: 33 | sys.stderr.write("Invalid command %s\n" % orig_cmd) 34 | sys.exit(2) 35 | 36 | if basecmd in ('git-receive-pack', 'git-upload-pack'): 37 | # git repositories need to be parsed specially 38 | thearg = ' '.join(allargs[1:]) 39 | if thearg[0] == "'" and thearg[-1] == "'": 40 | thearg = thearg.replace("'","") 41 | thearg = thearg.replace("\\'", "") 42 | if thearg[:len('/git/')] != '/git/' or not os.path.isdir(thearg): 43 | print "Invalid repository %s" % thearg 44 | sys.exit(3) 45 | allargs = [thearg] 46 | elif basecmd in ('scp'): 47 | thearg = ' '.join(allargs[1:]) 48 | firstLetter = allargs[2][0] 49 | secondLetter = allargs[2][1] 50 | uploadTarget = "/srv/web/releases/%s/%s/%s/" % (firstLetter, secondLetter, allargs[2]) 51 | if thearg.find('/') != -1: 52 | print "scp yourfile-1.2.tar.gz scm.fedorahosted.org:$YOURPROJECT # No trailing /" 53 | sys.exit(4) 54 | elif not os.path.isdir(uploadTarget): 55 | print "http://fedorahosted.org/releases/%s/%s/%s does not exist!" % (firstLetter, secondLetter, allargs[2]) 56 | sys.exit(5) 57 | else: 58 | newargs = [] 59 | newargs.append(allargs[0]) 60 | newargs.append(allargs[1]) 61 | newargs.append(uploadTarget) 62 | os.execv(cmd, [cmd] + newargs[1:]) 63 | sys.exit(1) 64 | else: 65 | allargs = allargs[1:] 66 | os.execv(cmd, [cmd] + allargs) 67 | sys.exit(1) 68 | -------------------------------------------------------------------------------- /plugins/fas-plugin-yubikey/burn-key.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # ykpersonalize -ofixed=ccccccccccci -afcaa0c5bf2e83ec040e4aeb7f8565293 -ouid=1e7f1da7d6d1 4 | from fedora.client import AccountSystem, AuthError 5 | from getpass import getpass, getuser 6 | import subprocess, sys, gettext 7 | from optparse import OptionParser 8 | 9 | t = gettext.translation('fas', '/usr/share/locale', fallback = True) 10 | _ = t.gettext 11 | 12 | parser = OptionParser(version = "0.1") 13 | parser.add_option('-u', '--username', 14 | dest = 'username', 15 | default = None, 16 | metavar = 'username', 17 | help = _('Fedora Account System username')) 18 | parser.add_option('-U', '--url', 19 | dest = 'url', 20 | default = 'https://admin.fedoraproject.org/accounts/', 21 | metavar = 'url', 22 | help = _('FAS URL (Default: https://admin.fedoraproject.org/accounts/')) 23 | 24 | (opts, args) = parser.parse_args() 25 | 26 | if not opts.username: 27 | print _('Please provide a username.') 28 | parser.print_help() 29 | sys.exit(0) 30 | 31 | if not getuser() == 'root': 32 | print _('''Please run this program as root as it will need to write 33 | directly to the yubikey usb''') 34 | sys.exit(5) 35 | 36 | print _( 37 | ''' 38 | Attention: You are about to reprogram your yubikey! Please ensure it is 39 | plugged in to your USB slot before continuing. The secret key currently on 40 | your yubikey will be destroyed as part of this operation! 41 | 42 | ''') 43 | 44 | print 'Contacting %s' % opts.url 45 | password = getpass('Password for %s: ' % opts.username) 46 | 47 | fas = AccountSystem(username=opts.username, password=password, base_url=opts.url) 48 | try: 49 | new_key = fas.send_request('yubikey/genkey', auth=True) 50 | except AuthError, e: 51 | print e 52 | sys.exit(1) 53 | 54 | print 55 | print _('New key generated in FAS, attempting to burn to yubikey') 56 | print 57 | 58 | opts = new_key['key'].split() 59 | 60 | try: 61 | retcode = subprocess.call(['/usr/bin/ykpersonalize', 62 | '-ofixed=%s' % opts[0], 63 | '-a%s' % opts[2], 64 | '-ouid=%s' % opts[1]]) 65 | except KeyboardInterrupt: 66 | print _(''' 67 | Burn attempt cancelled by user! Note: Even though the key did not get burned 68 | onto your key, FAS did generate a new one. This just means that if you did 69 | previously burn a different key, it will no longer work. 70 | ''') 71 | retcode=1 72 | 73 | if retcode: 74 | print "There was an error writing to your yubi key" 75 | else: 76 | print "Success! Your Yubikey ID is %s" % opts[0] 77 | -------------------------------------------------------------------------------- /client/fas.conf: -------------------------------------------------------------------------------- 1 | [global] 2 | ; url - Location to fas server 3 | url = http://localhost/accounts/ 4 | 5 | ; temp - Location to generate files while user creation process is happening 6 | temp = /var/db 7 | 8 | ; login - username to contact fas (must be in fas-system group - TODO: README for all of this) 9 | login = admin 10 | 11 | ; password - password for login name 12 | password = admin 13 | 14 | ; prefix - Install db files, etc, to a prefix (like a chroot for example) 15 | prefix = /tmp/chroot/ 16 | 17 | ; modefile - Location of a file containing saved home directory modes 18 | modefile = /var/lib/fas/client_dir_perms 19 | 20 | ; cla_group - Group for CLA requirements 21 | cla_group = cla_done 22 | 23 | [host] 24 | ; Group hierarchy is 1) groups, 2) restricted_groups 3) ssh_restricted_groups 25 | ; so if someone is in all 3, the client behaves the same as if they were just 26 | ; in 'groups' 27 | 28 | ; groups that should have a shell account on this system. 29 | groups = accounts 30 | 31 | ; groups that should have a restricted account on this system. 32 | ; restricted accounts use the restricted_shell value in [users] 33 | restricted_groups = 34 | 35 | ; ssh_restricted_groups: groups that should be restricted by ssh key. You will 36 | ; need to disable password based logins in order for this value to have any 37 | ; security meaning. Group types can be placed here as well, for example 38 | ; @hg,@git,@svn 39 | ssh_restricted_groups = @git 40 | 41 | ; aliases_template: Gets prepended to the aliases file when it is generated by 42 | ; fasClient 43 | aliases_template = /tmp/template.txt 44 | 45 | [users] 46 | ; default shell given to people in [host] groups 47 | shell = /bin/bash 48 | 49 | ; home - the location for fas user home dirs 50 | home = /home/fedora 51 | 52 | ; ssh_restricted_app - This is the path to the restricted shell script. It 53 | ; will not work automatically for most people though through alterations it 54 | ; is a powerfull way to restrict access to a machine. An alternative example 55 | ; could be given to people who should only have cvs access on the machine. 56 | ; setting this value to "/usr/bin/cvs server" would do this. 57 | ssh_restricted_app=/usr/bin/cvs server 58 | 59 | ; restricted_shell - The shell given to users in the ssh_restricted_groups 60 | restricted_shell = /sbin/nologin 61 | 62 | ; ssh_restricted_shell - The shell given to users in the ssh_restricted_groups 63 | ssh_restricted_shell = /bin/bash 64 | 65 | ; ssh_key_options - Options to be appended to people ssh keys. Users in the 66 | ; ssh_restricted_groups will have the keys they uploaded altered when they are 67 | ; installed on this machine, appended with the options below. 68 | ssh_key_options = no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty 69 | -------------------------------------------------------------------------------- /fas/static/js/prototype.improvements.js: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2008 Beau D. Scott | http://www.beauscott.com 3 | // 4 | // Permission is hereby granted, free of charge, to any person 5 | // obtaining a copy of this software and associated documentation 6 | // files (the "Software"), to deal in the Software without 7 | // restriction, including without limitation the rights to use, 8 | // copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the 10 | // Software is furnished to do so, subject to the following 11 | // conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 18 | // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 20 | // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 21 | // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 23 | // OTHER DEALINGS IN THE SOFTWARE. 24 | // 25 | 26 | /** 27 | * Prototype Improvements v0.1 28 | * Various additions to the prototype.js 29 | */ 30 | 31 | Object.extend(Event, { 32 | KEY_SHIFT: 16, 33 | KEY_CONTROL: 17, 34 | KEY_CAPSLOCK: 20, 35 | KEY_SPACE: 32, 36 | keyPressed: function(event) 37 | { 38 | return Browser.isMSIE() ? window.event.keyCode : event.which; 39 | } 40 | }); 41 | 42 | Browser = { 43 | 44 | /** 45 | * Returns the user agent 46 | * @param {bool} useAlert 47 | */ 48 | inspect: function(useAlert) 49 | { 50 | if(useAlert) 51 | alert(navigator.userAgent); 52 | else 53 | return navigator.userAgent; 54 | }, 55 | /** 56 | * Returns true if browser is MS Internet Explorer 57 | */ 58 | isMSIE: function() 59 | { 60 | return (navigator.userAgent.toLowerCase().indexOf("msie") > -1) && !this.isOpera(); 61 | }, 62 | /** 63 | * Returns true if browser is Opera 64 | */ 65 | isOpera: function() 66 | { 67 | return navigator.userAgent.toLowerCase().indexOf("opera") > -1; 68 | }, 69 | /** 70 | * Returns true if browzer is Mozilla 71 | */ 72 | isMozilla: function() 73 | { 74 | return (navigator.userAgent.toLowerCase().indexOf("mozilla") > -1) && !this.isOpera() && !this.isMSIE(); 75 | } 76 | } 77 | 78 | 79 | Object.genGUID = function() 80 | { 81 | var len = 8; 82 | if(!isNaN(parseInt(arguments[0]))) len = parseInt(arguments[0]); 83 | var chars = "abcdef0123456789"; 84 | var output = ""; 85 | while(output.length < len) 86 | { 87 | var rnd = Math.floor(Math.random() * (chars.length - 1)); 88 | output += chars.charAt(rnd); 89 | } 90 | return output; 91 | } -------------------------------------------------------------------------------- /fas/static/js/scriptaculous.js: -------------------------------------------------------------------------------- 1 | // script.aculo.us scriptaculous.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008 2 | 3 | // Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining 6 | // a copy of this software and associated documentation files (the 7 | // "Software"), to deal in the Software without restriction, including 8 | // without limitation the rights to use, copy, modify, merge, publish, 9 | // distribute, sublicense, and/or sell copies of the Software, and to 10 | // permit persons to whom the Software is furnished to do so, subject to 11 | // the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be 14 | // included in all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 20 | // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 21 | // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 22 | // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 | // 24 | // For details, see the script.aculo.us web site: http://script.aculo.us/ 25 | 26 | var Scriptaculous = { 27 | Version: '1.8.1', 28 | require: function(libraryName) { 29 | // inserting via DOM fails in Safari 2.0, so brute force approach 30 | document.write(' 39 | 40 | 41 | ${_('Approve')} 42 | 43 | 44 | 45 |
  • 46 | ${_('Remove')} 47 | 48 |
  • 49 |
  • 50 | ${_('Upgrade')} 51 | 52 |
  • 53 |
  • 54 | ${_('Downgrade')} 55 | 56 |
  • 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /fas/templates/fpca/index.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 14 | 15 | 16 | ${_('Fedora Accounts System')} 17 | 18 | 19 |

    ${_('Fedora Project Contributor Agreement')}

    20 | ${Markup(_('<a href="%(url)s">Text Version</a>') % 21 | {'url': tg.url('/fpca/text')})} 22 | 23 | ${Markup(_('<a href="%(url)s">Text Version</a>') % 24 | {'url': tg.url('/fpca/text')})} 25 | 26 |

    27 | ${Markup(_('You have already successfully completed the FPCA.') % 28 | {'url': tg.url('/fpca/text')})} 29 |

    30 | 31 | 32 |

    If any of the following is inaccurate, please correct it now: 33 | 34 |

    35 |
    36 |
    37 | 38 | 39 | 40 |
    41 |
    42 | 43 | 44 | 45 |
    46 |
    47 | 48 | 49 | 50 |
    51 |
    52 | 53 | 59 | 60 |
    61 |

    62 | ${_('If your country is not listed, select "Other"')} 63 |

    64 |

    65 | 66 |

    67 |
    68 | 69 | 70 |
    71 |
    72 |
    73 |
    74 | 75 | 76 | -------------------------------------------------------------------------------- /fas/plugin.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # Copyright © 2008 Ignacio Vazquez-Abrams 4 | # Copyright © 2014 Red Hat, Inc. 5 | # 6 | # This copyrighted material is made available to anyone wishing to use, modify, 7 | # copy, or redistribute it subject to the terms and conditions of the GNU 8 | # General Public License v.2. This program is distributed in the hope that it 9 | # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the 10 | # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 | # See the GNU General Public License for more details. You should have 12 | # received a copy of the GNU General Public License along with this program; 13 | # if not, write to the Free Software Foundation, Inc., 51 Franklin Street, 14 | # Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat trademarks that are 15 | # incorporated in the source code or documentation are not subject to the GNU 16 | # General Public License and may only be used or replicated with the express 17 | # permission of Red Hat, Inc. 18 | # 19 | # Author(s): Ignacio Vazquez-Abrams 20 | # 21 | 22 | import turbogears.controllers as controllers 23 | import turbogears.startup as startup 24 | import pkg_resources 25 | 26 | class BadPathException(Exception): 27 | pass 28 | 29 | class PathUnavailableException(Exception): 30 | pass 31 | 32 | class PluginControllerMixin(object): 33 | def requestpath(controller, plugin, path): 34 | '''Used by a plugin to request addition to a path''' 35 | if isinstance(path, basestring): 36 | path = path.split('/') 37 | if len(path) > 0 and len(path[0]) == 0: 38 | del path[0] 39 | if len(path) == 0: 40 | raise BadPathException('Empty path specified') 41 | frag = getattr(controller, path[0], None) 42 | if frag is None: 43 | p = plugin() 44 | p._root = controller 45 | setattr(controller, path[0], p) 46 | controller.plugins.append(p) 47 | return '/' + path[0] + '/', p 48 | if hasattr(frag, 'requestpath'): 49 | if len(path) > 1: 50 | return '/' + path[0] + frag.requestpath(plugin, path[1:]) 51 | raise PathUnavailableException('Path not deep enough') 52 | raise PathUnavailableException('Path already in use') 53 | 54 | def getpluginident(controller): 55 | '''The string returned by this method is prepended to ".plugins" 56 | in order to search for plugins''' 57 | raise NotImplementedError('Whoops! Forgot to override getpluginident!') 58 | 59 | def loadplugins(controller): 60 | for pluginEntry in pkg_resources.iter_entry_points('%s.plugins' % 61 | controller.getpluginident()): 62 | pluginClass = pluginEntry.load() 63 | if hasattr(pluginClass, 'initPlugin'): 64 | pluginClass.initPlugin(controller) 65 | startup.call_on_shutdown.append(controller.unloadplugins) 66 | 67 | def unloadplugins(controller): 68 | for plugin in controller.plugins: 69 | if hasattr(plugin, 'delPlugin'): 70 | plugin.delPlugin(controller) 71 | 72 | class RootController(controllers.RootController, PluginControllerMixin): 73 | def __init__(self, *args, **kwargs): 74 | super(controllers.RootController, self).__init__(*args, **kwargs) 75 | PluginControllerMixin.__init__(self, *args, **kwargs) 76 | self.plugins = [] 77 | self.loadplugins() 78 | 79 | 80 | class Controller(controllers.Controller, PluginControllerMixin): 81 | def __init__(self, *args, **kwargs): 82 | super(controllers.Controller, self).__init__(*args, **kwargs) 83 | self.plugins = [] 84 | self.loadplugins() 85 | 86 | __all__ = [PluginControllerMixin, RootController, Controller, 87 | BadPathException, PathUnavailableException] 88 | -------------------------------------------------------------------------------- /fas/templates/group/new.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Create a new FAS Group')} 8 | 9 | 10 |

    ${_('Create a new FAS Group')}

    11 |
    12 |
    13 | 14 | 15 | 16 |
    17 |
    18 | 19 | 20 | 21 |
    22 |
    23 | 24 | 25 | 26 |
    27 |
    28 | 29 | 30 | 31 |
    32 |
    33 | 34 | 35 | 36 |
    37 |
    38 | 39 |   40 | 41 |
    42 |
    43 | 44 |   45 | 46 |
    47 |
    48 | 49 | 50 | 51 |
    52 |
    53 | 54 | 55 | 56 |
    57 |
    58 | 59 | 60 | 61 |
    62 |
    63 | 64 |
    65 |
    66 | 67 | 68 | -------------------------------------------------------------------------------- /fas/templates/user/new.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | ${_('Sign up for a Fedora account')} 8 | 9 | 10 |

    ${_('Sign up for a Fedora account')}

    11 |

    ${_('NOTE:')} ${_('Username is permanent')} ${_('(i.e. it cannot be changed after registration and will never be deleted from the system).')} ${_('Personal information may be updated or removed at any time.')}

    12 |
    13 |
    14 | 15 | 16 |
    17 |
    18 | 19 | 20 | 21 |
    22 |
    23 | 24 | 25 |
    26 |
    27 | 28 | 29 | 30 |
    31 |
    32 | 33 | 34 | 35 |
    36 |
    37 | 38 | 39 | 40 |
    41 |
    42 | 43 | 44 |
    45 | 61 |
    62 | 63 | 64 | 65 |
    66 |
    67 | ${ET(captcha.display())} 68 | 69 |
    70 |
    71 | 72 |
    73 |
    74 | 75 | 76 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ===================================== 2 | FAS no Longer developed or maintained 3 | ===================================== 4 | 5 | The Fedora Account System (FAS2) is no longer developed or maintained. It was replaced in production in March 2021 by `Fedora Accounts `_. (which is actually comprised of many things, including `noggin `_, `freeipa-fas `_, and `fasjson `_). 6 | 7 | FAS2 was launched in 2008, and when it was decomissioned in 2021, the final version used in production was FAS2 0.14.1 and looked like the following screenshot: 8 | 9 | .. image:: https://docs.fedoraproject.org/en-US/fedora-accounts/_images/screenshots/fas2.png 10 | 11 | ---- 12 | FAS3 13 | ---- 14 | 15 | Around 2017, development was proceeding on FAS3, a complete re-write of FAS2. Ultimately, this project was not completed, and never reached production. This code is still availble in the FAS3 branch: https://github.com/fedora-infra/fas/tree/FAS3 16 | 17 | ===================== 18 | Fedora Account System 19 | ===================== 20 | 21 | :Authors: Ricky Zhou 22 | Mike McGrath 23 | Toshio Kuratomi 24 | Yaakov Nemoy 25 | Patrick Uiterwijk 26 | :Contact: infrastructure@lists.fedoraproject.org 27 | :Date: Wed, 26 March, 2008 28 | :For FAS version: 0.8.x 29 | 30 | The Fedora Account System holds information on Fedora Contributors to give 31 | them access to the wonderful things that Fedora has. 32 | 33 | .. contents:: 34 | 35 | This is a TurboGears_ project. It can be started by running the start-fas 36 | script. 37 | 38 | .. _TurboGears: http://www.turbogears.org 39 | 40 | --------- 41 | Upgrading 42 | --------- 43 | 44 | 0.8.13 => 0.8.14 45 | ================ 46 | 47 | When upgrading to 0.8.14 the database schema changed slightly, and new 48 | configuration options got introduced, for the security questions system. 49 | The people table gets two new columns, for the question and answers, and 50 | the configuration gets a new option to specify the key used to encrypt the 51 | security answer. Apply the schema update like this: 52 | 53 | sudo -u postgres psql fas2 < updates/fas2-0.8.13_to_0.8.14.sql 54 | 55 | Also, the new key_securityquestion configuration parameter should be set 56 | to the id of the key used to encrypt the answer to the security question. 57 | 58 | Also, you should not forget to set deployment_type to the type of deployment 59 | of this installation. 60 | 61 | 0.8.7 => 0.8.8 62 | ============== 63 | We still haven't worked out using migrate scripts on our database servers so 64 | the changes here need to be done like this: 65 | 66 | sudo -u postgres psql fas2 < updates/fas2-0.8.7_to_0.8.8.sql 67 | 68 | 0.8.5 => future 69 | =============== 70 | 71 | From 0.8.5 and onward we will be using SQLAlchemy Migrate to handle database 72 | upgrades. To use it, it assumes you have already installed fas2.sql into your 73 | posgresql database. The instructions for installing SQLAlchemy-Migrate on top 74 | can be found below in the installation instructions. 75 | 76 | sqlalchemy-migrate will need to be installed. To do so, run: 77 | 78 | sudo yum -y install python-migrate 79 | 80 | (Since I don't trust this yet, the latest change will need to add: 81 | + invite_only BOOLEAN DEFAULT FALSE, 82 | to the groups table. There is a migrate script checked in. Need to verify 83 | that it works and that we'll do that.) 84 | 85 | 0.8.4 => 0.8.5 86 | ============== 87 | 88 | When upgrading to 0.8.5 the database schema changed slightly. The configs 89 | table now has a unique constraint to prevent duplicates being entered. Use 90 | this to update your existing schema:: 91 | 92 | sudo -u postgres psql fas2 < updates/fas2-0.8.4_to_0.8.5.sql 93 | 94 | 0.8.3 => 0.8.4 95 | ============== 96 | 97 | When upgrading from 0.8.3 to 0.8.4 there are some new database changes: 98 | 99 | :groups.url: URL where others can look for information about the group 100 | :groups.mailing_list: Specify a mailing list address that others can use to 101 | contact the group 102 | :groups.mailing_list_url: A url where others can look at list archives and 103 | sign up 104 | :groups.irc_network: IRC network on which the IRC channel is 105 | :groups.irc_channel: IRC channel where communication with the group occurs 106 | :people.country_code: Two digit country code for where the user is from 107 | :user_group: View that allows mod_auth_pgsql to work with the db 108 | :session: Table for doing OpenID sessions. 109 | 110 | You can add these to your database by running the sql commands in 111 | ``updates/fas2-0.8.3_to_0.8.4.sql`` like this:: 112 | 113 | sudo -u postgres psql fas2 < updates/fas2-0.8.3_to_0.8.4.sql 114 | 115 | The country code functionality also makes use of python-GeoIP. This should 116 | be installed as a dependency if you use the fas rpms. Otherwise you need to 117 | install that manually:: 118 | 119 | sudo yum -y install python-GeoIP 120 | -------------------------------------------------------------------------------- /ca/openssl.cnf: -------------------------------------------------------------------------------- 1 | # $Id: openssl.cnf,v 1.3 2007/06/03 18:15:11 jmates Exp $ 2 | # 3 | # OpenSSL configuration file for custom Certificate Authority. Use a 4 | # different openssl.cnf file to generate certificate signing requests; 5 | # this one is for use only in Certificate Authority operations (csr -> 6 | # cert, cert revocation, revocation list generation). 7 | # 8 | # Be sure to customize this file prior to use, e.g. the commonName and 9 | # other options under the root_ca_distinguished_name section. 10 | # 11 | # http://sial.org/howto/openssl/ca/ 12 | # http://www.openssl.org/docs/apps/ca.html 13 | 14 | HOME = . 15 | RANDFILE = $ENV::HOME/.rnd 16 | 17 | [ ca ] 18 | default_ca = CA_default 19 | 20 | [ CA_default ] 21 | dir = . 22 | # unsed at present, and my limited certs can be kept in current dir 23 | #certs = $dir/certs 24 | new_certs_dir = $dir/newcerts 25 | crl_dir = $dir/crl 26 | database = $dir/index 27 | 28 | certificate = $dir/ca-cert.pem 29 | serial = $dir/serial 30 | crl = $dir/ca-crl.pem 31 | private_key = $dir/private/ca-key.pem 32 | RANDFILE = $dir/private/.rand 33 | 34 | x509_extensions = usr_cert 35 | 36 | # Make new requests easier to sign - allow two subjects with same name 37 | # (Or revoke the old certificate first.) 38 | unique_subject = no 39 | 40 | # Comment out the following two lines for the "traditional" 41 | # (and highly broken) format. 42 | name_opt = ca_default 43 | cert_opt = ca_default 44 | 45 | default_crl_days= 30 46 | default_days = 365 47 | # if need to be compatible with older software, use weaker md5 48 | default_md = sha1 49 | # MSIE may need following set to yes? 50 | preserve = no 51 | 52 | # A few difference way of specifying how similar the request should look 53 | # For type CA, the listed attributes must be the same, and the optional 54 | # and supplied fields are just that :-) 55 | policy = policy_match 56 | 57 | # For the CA policy 58 | [ policy_match ] 59 | countryName = match 60 | stateOrProvinceName = match 61 | organizationName = match 62 | organizationalUnitName = optional 63 | commonName = supplied 64 | emailAddress = optional 65 | 66 | # For the 'anything' policy 67 | # At this point in time, you must list all acceptable 'object' 68 | # types. 69 | [ policy_anything ] 70 | countryName = optional 71 | stateOrProvinceName = optional 72 | localityName = optional 73 | organizationName = optional 74 | organizationalUnitName = optional 75 | commonName = supplied 76 | emailAddress = optional 77 | 78 | #################################################################### 79 | [ req ] 80 | default_bits = 2048 81 | default_keyfile = ./private/ca-key.pem 82 | default_md = sha1 83 | 84 | prompt = no 85 | distinguished_name = root_ca_distinguished_name 86 | 87 | x509_extensions = v3_ca 88 | 89 | # Passwords for private keys if not present they will be prompted for 90 | # input_password = secret 91 | # output_password = secret 92 | 93 | # This sets a mask for permitted string types. There are several options. 94 | # default: PrintableString, T61String, BMPString. 95 | # pkix : PrintableString, BMPString. 96 | # utf8only: only UTF8Strings. 97 | # nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). 98 | # MASK:XXXX a literal mask value. 99 | # WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings 100 | # so use this option with caution! 101 | string_mask = nombstr 102 | 103 | # req_extensions = v3_req 104 | 105 | [ root_ca_distinguished_name ] 106 | commonName = Test CA 107 | countryName = US 108 | stateOrProvinceName = North Carolina 109 | localityName = Raleigh 110 | 0.organizationName = Fedora Project 111 | emailAddress = ricky@fedoraproject.org 112 | 113 | [ usr_cert ] 114 | 115 | # These extensions are added when 'ca' signs a request. 116 | 117 | # This goes against PKIX guidelines but some CAs do it and some software 118 | # requires this to avoid interpreting an end user certificate as a CA. 119 | 120 | basicConstraints=CA:FALSE 121 | 122 | # PKIX recommendations harmless if included in all certificates. 123 | subjectKeyIdentifier=hash 124 | authorityKeyIdentifier=keyid,issuer:always 125 | 126 | nsCaRevocationUrl = https://www.sial.org/ca-crl.pem 127 | #nsBaseUrl 128 | #nsRevocationUrl 129 | #nsRenewalUrl 130 | #nsCaPolicyUrl 131 | #nsSslServerName 132 | 133 | [ v3_req ] 134 | 135 | # Extensions to add to a certificate request 136 | 137 | basicConstraints = CA:FALSE 138 | keyUsage = nonRepudiation, digitalSignature, keyEncipherment 139 | 140 | [ v3_ca ] 141 | 142 | 143 | # Extensions for a typical CA 144 | 145 | # PKIX recommendation. 146 | subjectKeyIdentifier=hash 147 | authorityKeyIdentifier=keyid:always,issuer:always 148 | 149 | # This is what PKIX recommends but some broken software chokes on critical 150 | # extensions. 151 | #basicConstraints = critical,CA:true 152 | # So we do this instead. 153 | basicConstraints = CA:true 154 | 155 | [ crl_ext ] 156 | 157 | # CRL extensions. 158 | # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. 159 | 160 | # issuerAltName=issuer:copy 161 | authorityKeyIdentifier=keyid:always,issuer:always 162 | -------------------------------------------------------------------------------- /convert.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | import pgdb 3 | 4 | from turbogears.view import engines 5 | import turbogears.view 6 | import turbogears.util as tg_util 7 | from turbogears import view, database, errorhandling, config 8 | from itertools import izip 9 | from inspect import isclass 10 | from turbogears import update_config, start_server 11 | import cherrypy 12 | cherrypy.lowercase_api = True 13 | from os.path import * 14 | import sys 15 | import time 16 | import crypt 17 | import random 18 | 19 | if len(sys.argv) > 1: 20 | update_config(configfile=sys.argv[1], 21 | modulename="fas.config") 22 | elif exists(join(dirname(__file__), "setup.py")): 23 | update_config(configfile="dev.cfg",modulename="fas.config") 24 | else: 25 | update_config(configfile="prod.cfg",modulename="fas.config") 26 | 27 | from sqlalchemy import * 28 | from sqlalchemy.exc import * 29 | from fas.model import * 30 | 31 | 32 | def generate_salt(length=8): 33 | chars = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' 34 | salt = '' 35 | for i in xrange(length): 36 | salt += random.choice(chars) 37 | return salt 38 | 39 | 40 | 41 | db = pgdb.connect(dsn='localhost', user='fedora', password='test', database='fedorausers') 42 | 43 | c = db.cursor() 44 | 45 | c.execute('select id, username, email, human_name, gpg_keyid, ssh_key, password, comments, postal_address, telephone, affiliation, creation, approval_status, internal_comments, ircnick from person order by id;') 46 | 47 | print "Converting People Table" 48 | for person in c.fetchall(): 49 | (id, username, email, human_name, gpg_keyid, ssh_key, password, comments, postal_address, telephone, affiliation, creation, approval_status, internal_comments, ircnick) = person 50 | print "\t%i - %s" % (id, username) 51 | p = People() 52 | p.id = id 53 | p.username = username 54 | p.human_name = human_name 55 | p.gpg_keyid = gpg_keyid 56 | p.ssh_key = ssh_key 57 | p.password = crypt.crypt(password, "$1$%s" % generate_salt(8)) 58 | p.comments = comments 59 | p.postal_address = postal_address 60 | p.telephone = telephone 61 | p.creation = creation 62 | p.internal_comments = internal_comments 63 | p.ircnick = ircnick 64 | p.status = 'active' 65 | p.email = email 66 | try: 67 | session.flush() 68 | except IntegrityError, e: 69 | print "\tERROR - Could not create %s - %s" % (username, e) 70 | session.close() 71 | continue 72 | 73 | c.execute('select id, name, owner_id, group_type, needs_sponsor, user_can_remove, prerequisite_id, joinmsg from project_group;') 74 | bool_dict = {0 : False, 1 : True} 75 | print "Creating Groups..." 76 | admin = People.by_username('admin') 77 | admin_id = admin.id 78 | for group in c.fetchall(): 79 | (id, name, owner_id, group_type, needs_sponsor, user_can_remove, prerequisite_id, joinmsg) = group 80 | print "%i - %s" % (id, name) 81 | try: 82 | group = Groups() 83 | group.id = id 84 | group.name = name 85 | group.display_name = name 86 | if owner_id == 100001: 87 | ''' Update to new admin id ''' 88 | owner_id = admin_id 89 | group.owner_id = owner_id 90 | group.group_type = group_type 91 | group.needs_sponsor = bool(bool_dict[needs_sponsor]) 92 | group.user_can_remove = bool(bool_dict[user_can_remove]) 93 | # if prerequisite_id: 94 | # prerequisite = Groups.by_id(prerequisite_id) 95 | # group.prerequisite = prerequisite 96 | group.joinmsg = joinmsg 97 | # Log here 98 | session.flush() 99 | except IntegrityError, e: 100 | print "\tERROR - The group: '%s' (%i) could not be created - %s" % (name, id, e) 101 | except FlushError, e: 102 | print "\tERROR - The group: '%s' (%i) could not be created - %s" % (name, id, e) 103 | except InvalidRequestError, e: 104 | print "\tERROR - The group: '%s' (%i) could not be created - %s" % (name, id, e) 105 | 106 | session.close() 107 | 108 | c.execute('select person_id, project_group_id, role_type, role_domain, role_status, internal_comments, sponsor_id, creation, approval from role order by person_id;') 109 | print "Creating Role Maps..." 110 | for role in c.fetchall(): 111 | (person_id, project_group_id, role_type, role_domain, role_status, internal_comments, sponsor_id, creation, approval) = role 112 | print "%s - %s" % (person_id, project_group_id) 113 | try: 114 | role = PersonRoles() 115 | if len(role_status) > 10: 116 | role_status = 'approved' 117 | if role_status == 'declined': 118 | ''' No longer exists ''' 119 | continue 120 | role.role_status = role_status 121 | role.role_type = role_type 122 | role.member = People.by_id(person_id) 123 | role.group = Groups.by_id(project_group_id) 124 | session.flush() 125 | except ProgrammingError, e: 126 | print "\tERROR - The role %s -> %s could not be created - %s" % (person_id, project_group_id, e) 127 | session.close() 128 | except IntegrityError, e: 129 | if e.message.find('dupilcate key'): 130 | print "\tERROR - The role %s -> %s already exists! Skipping" % (person_id, project_group_id) 131 | session.close() 132 | continue 133 | print "\tERROR - The role %s -> %s could not be created - %s" % (person_id, project_group_id, e) 134 | session.close() 135 | --------------------------------------------------------------------------------