Ticket #167 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

Members of a community cannot create folder or upload files

Reported by: ewout Assigned to: ewout
Priority: normal Milestone: 0.9
Component: core Version:
Severity: normal Keywords:
Cc: Patch Included:
Review Stage:

Description

a permission issue. Note the difference between file->owner (owner of the file) and file->files_owner (community in which the file was uploaded). The same holds for folders. This distinction is not addressed correctly in some places in elgg (especially the ..._actions.php files, which seem to be older).

Change History

11/29/07 22:09:04 changed by misja

  • owner changed from misja to ewout.
  • milestone set to 0.9.

12/02/07 23:48:17 changed by ewout

This needs some function, in userlib I suppose, wether a user_id is a member of a community or not. Until then, keep this open. (there seem to be functions in mod/community, written by Diego, meant to be called with run("..."). Do we want to use those? I guess we want to move away from the run stuff, right?)

Anyway, if we have these functions, than I guess we'll have something like

function file_permissions_check($objecttype, $owner){
        $run_result = false;
	if ($objecttype == "files" || $objecttype == "files:edit") {
	  if (logged_on && ($owner == $_SESSION['userid'] || is_member($ower,$_SESSION['userid']))) {
	        $run_result = true;
	    }
	}
	return $run_result;
}

12/07/07 22:43:16 changed by rho

fixed in [1422]

12/07/07 22:46:27 changed by rho

  • status changed from new to closed.
  • resolution set to fixed.