|
a/Allura/allura/model/project.py |
|
b/Allura/allura/model/project.py |
|
... |
|
... |
18 |
from allura.lib import helpers as h
|
18 |
from allura.lib import helpers as h
|
19 |
from allura.lib import plugin
|
19 |
from allura.lib import plugin
|
20 |
from allura.lib import exceptions
|
20 |
from allura.lib import exceptions
|
21 |
from allura.lib import security
|
21 |
from allura.lib import security
|
22 |
from allura.lib.security import has_access
|
22 |
from allura.lib.security import has_access
|
23 |
|
|
|
24 |
try:
|
|
|
25 |
from forgewiki.wiki_main import ForgeWikiApp
|
|
|
26 |
except ImportError:
|
|
|
27 |
ForgeWikiApp = None
|
|
|
28 |
|
23 |
|
29 |
from .session import main_orm_session
|
24 |
from .session import main_orm_session
|
30 |
from .session import project_doc_session, project_orm_session
|
25 |
from .session import project_doc_session, project_orm_session
|
31 |
from .neighborhood import Neighborhood
|
26 |
from .neighborhood import Neighborhood
|
32 |
from .auth import ProjectRole
|
27 |
from .auth import ProjectRole
|
|
... |
|
... |
519 |
self,
|
514 |
self,
|
520 |
users=None, apps=None,
|
515 |
users=None, apps=None,
|
521 |
is_user_project=False,
|
516 |
is_user_project=False,
|
522 |
is_private_project=False):
|
517 |
is_private_project=False):
|
523 |
from allura import model as M
|
518 |
from allura import model as M
|
|
|
519 |
try:
|
|
|
520 |
from forgewiki.wiki_main import ForgeWikiApp
|
|
|
521 |
except ImportError:
|
|
|
522 |
ForgeWikiApp = None
|
|
|
523 |
|
524 |
self.notifications_disabled = True
|
524 |
self.notifications_disabled = True
|
525 |
session(self).flush(self)
|
525 |
session(self).flush(self)
|
526 |
if users is None: users = [ c.user ]
|
526 |
if users is None: users = [ c.user ]
|
527 |
if apps is None:
|
527 |
if apps is None:
|
528 |
if is_user_project:
|
528 |
if is_user_project:
|
|
... |
|
... |
556 |
pr = user.project_role()
|
556 |
pr = user.project_role()
|
557 |
pr.roles = [ role_admin._id ]
|
557 |
pr.roles = [ role_admin._id ]
|
558 |
# Setup apps
|
558 |
# Setup apps
|
559 |
for i, (ep_name, mount_point, label) in enumerate(apps):
|
559 |
for i, (ep_name, mount_point, label) in enumerate(apps):
|
560 |
self.install_app(ep_name, mount_point, label, ordinal=i)
|
560 |
self.install_app(ep_name, mount_point, label, ordinal=i)
|
|
|
561 |
import pdb; pdb.set_trace()
|
561 |
if ForgeWikiApp is not None:
|
562 |
if ForgeWikiApp is not None:
|
562 |
home_app = self.app_instance('home')
|
563 |
home_app = self.app_instance('home')
|
563 |
if isinstance(home_app, ForgeWikiApp):
|
564 |
if isinstance(home_app, ForgeWikiApp):
|
564 |
home_app.show_discussion = False
|
565 |
home_app.show_discussion = False
|
565 |
home_app.show_left_bar = False
|
566 |
home_app.show_left_bar = False
|