Ticket #2421 (closed planned_task: obsolete)

Opened 10 years ago

Last modified 8 years ago

upload-permissions

Reported by: dido Owned by: mira
Priority: major Milestone:
Component: S2S_WEB_UI Version: 2.0
Keywords: server Cc: mira
Category: S2S Effort:
Importance: 70 Ticket_group:
Estimated Number of Hours: 0 Add Hours to Ticket: 0
Billable?: yes Total Hours: 0
Analysis_owners: dido, mira Design_owners: mira
Imp._owners: mira, dido, meddle Test_owners:
Analysis_reviewers: Changelog: Changelog
Design_reviewers: meddle Imp._reviewers: deyan, todor, pap
Test_reviewers: Analysis_score: 3
Design_score: 4 Imp._score: 3
Test_score: 0

Description (last modified by todor) (diff)

The goal of this task is to allow users to upload books on the server and set permissions to them via web ui.

  • The upload controls look too far one from another and don't seem like one control. The upload button is too far away from the browse button.
  • Add radio buttons for book permissions after the browse control.
    • No rights - in default state this radio button is selected
    • Read rights
    • Read and write rights
  • Also when a book is uploaded from the web ui, it's not listed anywhere - fix this. The reason may be that no one have read rights over this book.
    • The book should be visible inside browse section in the web ui
    • The book should be visible inside the client.
    • NOTE. Users should see certain book only if he have read or write rights over the book.

Attachments

webPermissions.patch (10.3 KB) - added by mira 10 years ago.

Change History

comment:1 Changed 10 years ago by dido

  • Owner set to dido
  • Status changed from new to s1a_analysis_started

comment:2 Changed 10 years ago by dido

  • Summary changed from upload-permisions to upload-permissions

comment:3 Changed 10 years ago by dido

  • Status changed from s1a_analysis_started to s1b_analysis_finished
  • Description modified (diff)

comment:4 Changed 10 years ago by dido

  • Analysis_owners set to dido

comment:5 Changed 10 years ago by dido

  • Cc mira added

comment:6 Changed 10 years ago by mira

  • Status changed from s1b_analysis_finished to new

comment:7 Changed 10 years ago by dido

  • Status changed from new to s1a_analysis_started
  • Description modified (diff)
  • Analysis_owners changed from dido to dido, mira

comment:8 Changed 10 years ago by dido

  • Status changed from s1a_analysis_started to s1b_analysis_finished
  • Description modified (diff)

comment:9 Changed 10 years ago by todor

  • Status changed from s1b_analysis_finished to s1c_analysis_ok
  • Description modified (diff)
  • Analysis_score changed from 0 to 3

maybe the last point is not correct and should be removed, the books are visible from the web ui, not sure if it is part of this task to make them display according to the user rights (e.g. only the books that the user has rights for to be displayed, when he/she is logged)

comment:10 Changed 10 years ago by mira

  • Design_owners set to mira
  • Owner changed from dido to mira
  • Status changed from s1c_analysis_ok to s2a_design_started

comment:11 Changed 10 years ago by mira

  • Status changed from s2a_design_started to s2b_design_finished

Upload Resource

Extract a common method at the ResourceDirectoryH to be used for uploading resources. (At this point they are only books.) This method should change the security permissions and add a given resource to a server directory. It would be used in both author and web for uploading resources with permissions.

The method should take as arguments:

  • ResourceDirectoryH - the main server directory for resources.
  • the ResourceAccess - access to the uploaded resource.
  • ResourceRefR4 - the ref of the user that is uploading the resource
  • The SecirityPermission level for the default group of users.
  • The Facade to be user for rewriting the server model of the resource.

WEB UI

Move the submit button (labeled 'Upload') closer to the browse control.
Add a radion button group in the resource_directory.jspx that should act as the permission buttons in the server upload dialog.
Change the UploadResourceHandler to check those permissions and upload the resource accordingly.

Changed 10 years ago by mira

comment:12 Changed 10 years ago by mira

This patch contains only desing related code.

comment:13 Changed 10 years ago by meddle

  • Status changed from s2b_design_finished to s2c_design_ok
  • Design_score changed from 0 to 4
  • Design_reviewers set to meddle
  • Short, clean, good design.
  • Don't forget to take out five or more AutoActions for the implementation.
    • The packets you must move them should be named "actions" and will be in the corresponding module of the action.
    • It is better to take out actions only for one module.
    • And it is better to be your own actions.

4p

comment:14 Changed 10 years ago by mira

  • Status changed from s2c_design_ok to s3a_implementation_started
  • Imp._owners set to mira, dido

comment:15 Changed 9 years ago by mira

  • Status changed from s3a_implementation_started to s3b_implementation_finished
  • Imp._owners changed from mira, dido to mira, dido, meddle

The implementation is done according to the design in the [browse: branches/private/mira/webPermissions]

  • I will not be extracting AutoActions in this task.
  • I made the ResourceRenderers to be registered to an extension point:
    • I made ResourceRendererProvider interface with four methods - getKind(), getAction() and getRenderer() by given ResourceH and getSortKey().
    • The ResourceRendererFactory just checks for the first action that is with the appropriate kind and action.
    • The logic from the switch is moved to the renderer providers for delete, download and view.
    • There is different logic only for the directory renderer. It creates a list of all visible resources for the currently logged in user. For them I made a simple immutable class ResourceItem.

comment:16 Changed 9 years ago by pap

  • Status changed from s3b_implementation_finished to s3c_implementation_ok
  • Imp._score changed from 0 to 3
  • Imp._reviewers set to deyan, todor, pap
  • Commited in [9187].
  • I find it strange that the ResourceDirectoryH.uploadToDirectory has two AutoActions in it
  • In the same method I find the boolean isUpload parameter a bit strange as there are two other parameter that can be used to comput this.
  • You submitted code with warnings about missing JavaDoc. So 3p

comment:17 Changed 8 years ago by meddle

  • Status changed from s3c_implementation_ok to closed
  • Resolution set to obsolete

Closing all the tickets before M Y1

Note: See TracTickets for help on using tickets.