Re: what is the pourpose of "fake" projects?
Adam Tauno WIlliams <[email protected]> Tue, 19 May 2009 07:17:38 -0400
| Newsgroups | gmane.comp.cms.opengroupware.user |
|---|---|
| Message-ID | <[email protected]> |
--=-3w0mBx3ZxZdeHV5locsf
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Tue, 2009-05-19 at 11:54 +0200, Renzo Vettori wrote:
> As an experiment, I manually changed the flag "is_fake" to 0 in
> "projects" db table. The result is: 1. project becomes listed in webui;
> 2. permission became effective for the project itself, NOT for related
> documents
> In a second attempt, I manually addedd the "url" property in "projects"
> db table. The result is: 1. project is listed in webui; 2. permission
> became effective for both project itself AND for related documents.
> Only adding the "url" property did not work (permission did not work
> both for the project itself and for related documents).
Excellent, thanks for the feedback. I think the
> So, as a very temporary workaround, I think I can script the changes to
> be made in database for enterprises added outside the webui (which is my
> first aim), the only collateral damage being many more projects being
> listed in the "project" section of the webui. Do you think this is ok?
> As a related thought, I think that the "permission" editor in the webui
> for filesystem projects, which can't have any permission applied, is
> really confusing.
I believe it is disabled for filesystem projects; but the lack of a URL
breaks that. I believe the LSNewEnterpriseCommand command needs to be
modified to set the url property of the "fake" project.
If you build from source you can try the attached path that will set a
database-backed style URL for new "fake" projects created for new
enterprises.
> I really like opengroupware and would like to see it receive all the
> attention it deserves, as a basic component for "sound" intranet
> projects, so I appreciate very much your committment to help users
Well, I use it too! :)
--=-3w0mBx3ZxZdeHV5locsf
Content-Disposition: attachment; filename="FakeProjectNeedsAURL.patch"
Content-Type: text/x-patch; name="FakeProjectNeedsAURL.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Index: LSEnterprise/LSNewEnterpriseCommand.m
===================================================================
--- LSEnterprise/LSNewEnterpriseCommand.m (revision 2221)
+++ LSEnterprise/LSNewEnterpriseCommand.m (working copy)
@@ -87,11 +87,22 @@
- (id)_newProjectInContext:(id)_context {
id ep, proj;
NSCalendarDate *start, *end;
+ NSString *skyId, *urlStr;
ep = [self object];
start = [NSCalendarDate date];
end = [self defaultFakeProjectEndDate];
+
+ skyId = [[NSUserDefaults standardUserDefaults] stringForKey:@"skyrix_id"];
+ if ([skyId length] == 0) {
+ urlStr = [NSString stringWithFormat:@"skyrix://%@/",
+ [[NSHost currentHost] name]];
+ } else {
+ urlStr = [NSString stringWithFormat:@"skyrix://%@/%@/",
+ [[NSHost currentHost] name],
+ skyId];
+ }
proj = LSRunCommandV(_context, @"project", @"new",
@"name", [ep valueForKey:@"description"],
@@ -99,6 +110,7 @@
@"endDate", end,
@"ownerId", [ep valueForKey:@"ownerId"],
@"isFake", yesNum,
+ @"url", urlStr,
nil);
if (proj == nil)
return nil;
--=-3w0mBx3ZxZdeHV5locsf--
--
OpenGroupware.org Users
[email protected]
http://mail.opengroupware.org/mailman/listinfo/users