Not sure how to set this up

Permalink Browser Info Environment
Hello,

I'm rather new to the C5, but not so much so for CMS engines. I'm not sure how to set this up correctly, hopefully some of you can give a helping hand :-) I'm rather shocked at the lack of documentation on this module, as the rest of C5 is rather well documented... hopefully this will get corrected in the future.

After poking around on the forums it seems what I'm trying to do is possible, though i'm not exactly sure as to how to go about setting it up correctly. I know I will first need to enable advanced permissions. Here is what I need to set up:

Will will be hosting some relatively sensitive files that are used for company specific training operations. We need our member to be able to go to one page, that has one document library block that is a listing of all the files within a file set that is named after their company. To keep things simple for us and them, there will be one login per company and it will simply be a member/registered user and assigned to their file set through advanced permissions. This user will need access to upload/delete and generally maintain their respective files in their file set.

IE...
Company A - File set A - full access
Company B - File set B - full access
Company C - File set C - full access

I can't have company A, have access too, or see the files in Company B

Our instructors and admins will be the only groups that have access to see all the files in all the file sets. Again, I'm thinking this is simple through advanced permissions. My question about this is; is there any way that we can format the presentation of files once the instructor group has full access to all files so that when they view the block it will give a nice breakout of each file set, and not jumble everything together?

I don't want to have a page for each company, which in turn has its own document block. I also don't want to have to set specific permissions of files as they will be changing the content of their file set fairly regularly. I also can not have the possibility of these files being attained via direct url link. I'm not sure if this got resolved from reading the other post found here:http://www.concrete5.org/marketplace/addons/document_library/suppor... of if I need to go ahead and do this once I've set it up?

I'm hopeing some can help me out here, as i'm rather new at this c5 thing and not sure where everything is yet (still getting accustomed to the interface.)

Type: Discussion
Status: Archived
atsdenver
View Replies:
mkly replied on at Permalink Reply
mkly
Hello,
Based on how concrete5 is set up, I would highly reccommend creating a new page for each company and document library. I would set each Document Library block to the proper file set, and then set the Page permissions. I would set up a top level page named "Companies" and have subsections for each company.

I know it is tempting to try to only have one page, but the general design on concrete5 itself, lends itself to page permissions and I feel like you will have a much better time of it to go with it.

Best Wishes,
Mike
atsdenver replied on at Permalink Reply
atsdenver
I'm giving this some thought - The downside I see for this is that the instructors then have to navigate to multiple pages to the forms for different companies.

Is it possible to set up with one page, or due to permissions, do I really need to have a page for each company?
mkly replied on at Permalink Reply
mkly
Hello,
I would create a different page for the Instructors and Admins that will show all the files you want to include. Then you can set this page to only be viewable by Instructors and Admins.

I've been there before, and this is just from years of experience with concrete5. The design of the CMS is very page based, and trying to make pages do two different things often just leads to trouble.

Also, you can create a Composer page for creating new companies.

Best Wishes,
Mike
atsdenver replied on at Permalink Reply
atsdenver
Thanks much for the advice, I'll go about it as you've described. I've also had a chance to talk this over with the instructors and they would actually like to go in to the specific company page to find the files as they only work with one company at a time. Sounds like your idea will be best.
mkly replied on at Permalink Reply
mkly
Sounds good. Let me know if you have any questions going along. The instructors situation is another good example. Page permissions are very felxible so it makes it a lot easier to manage access for unique requests. Even things like granting someone 24 hour access to a particular company or giving particular instructors permissions to particular companies etc.

Best Wishes,
Mike
atsdenver replied on at Permalink Reply 3 Attachments
atsdenver
Ok, I'm a little lost now :-)

I've added a page for each copmany and a file set. I've enabled advanced permissions. I've created a user per company, and given that user permission to see their respective page only.

I've set up the permissions for that companies file set to include the following: View Files, Search Files in File Manager, Delete File, Add File. Note - this is a USER, not a group.

Problem is when that user logs in, they can see the file but can not upload/delete or modify it...

See Capture 1 and 2 images.

Now for the document library block I've selected the following:
The correct file set
"Files must be in... " (still not sure what this does) - selected "in all sets"
Allow users to manage files based on file permissions - is check
and in the next tab, the "properties to display" setting are configured - see permission 3 image.

Here is what i'm trying to get working:
I need the user to be able to add files to their file set, modify them, search and sort them, and delete them. But only for their file set.

I think I have this set up right, but I must be missing something...
mkly replied on at Permalink Reply
mkly
Hello,
I got pretty backed up this Monday, so I'm just getting back to this. I'll need to take a closer look and I will have to get to you first thing tomorrow morning.

Best Wishes,
Mike
mkly replied on at Permalink Reply
mkly
Hello,
Ok, a couple issues going on. The first is that you likely have to set the Document Library block to display "Edit" in the settings of the block. This will show Edit.

Delete is not actually a part of Document Library, but I threw something together for you to use.

You'll have to create a new custom template. To do that copyt the file
/packages/document_library/blocks/view.php
to
/blocks/document_library/templates/delete_files/view.php

Then add this to the very bottom of that file
<script type="text/javascript">
ccmDocLibrary.deleteFileDialog = function (src) {
   var settings = {
      model:"false",
      width:"500",
      height:"350",
      title: ccmi18n_filemanager.deleteFile,
      onClose: function() {
         window.setTimeOut($.fn.dialog.hideLoader, 1000);
      },
      href:src
   };
   $.fn.dialog.open(settings);
   return false;
}

And around line #357 change
<td class="ccm-doc-library-cell">
<a href="javascript:void(0);" onclick="ccmDocLibrary.showPropertiesDialog('<?php  echo View::url('/tools/required/files/properties')."?fID=". $fv->getFileId();?>')"><?php  echo t('Edit')?></a>
</td>

<td class="ccm-doc-library-cell">
                        <a href="javascript:void(0);" onclick="ccmDocLibrary.showPropertiesDialog('<?php  echo View::url('/tools/required/files/properties')."?fID=". $fv->getFileId();?>')"><?php  echo t('Edit')?></a>
//
// Addition
//
<?php if($filePermissions->canDelete()) { ?>
  | <a href="javascript:void(0);" onclick="ccmDocLibrary.deleteFileDialog('<?php echo View::url('/tools/required/files/delete')."?searchInstance=234324&fID=". $fv->getFileId();?>')"><?php echo t('Delete')?></a>
<?php } ?>
//
// End Addition
//
</td>


That should give you a delete button for those who have delete priviledges as well.

Let me know how that works for you and hopefully I didn't typo anything.

Best Wishes,
Mike
atsdenver replied on at Permalink Reply 5 Attachments
atsdenver
OK,

Sorry for the slow reply on this - we got busy with another project and am not just coming back to this. This is still an issue - and I've even found a further bug that I need to submit...

1) Bug: When I change the permissions of the document library block to override the page permissions, then for the edit block I add any groups or users, then submit/ok - it removes all permissions. See the attached video. I don't think this bug is related to this issue though as its doing it for EVERY block on the site, regardless of what it is. (was planning on submitting a bug report)

2) I've made the changes you've given but there were some folder structure differences from what you had given. What I did was copy the following folder and all of its contents
From:
/packages/document_library/blocks/document_library (this was the default pathing)
To:/packages/document_library/blocks/templates (new folder/delete_files (new folder)

Then I changed the view.php as you had given.

I'm not sure if this will work with the folder structure? And I'm still new as c5, how do I add the custom template from there that uses this?

3) I'm wondering if i've got some permissions hierarchy problem - if you see the 4 attached photos, the admin login can clearly edit/add (got tot get delete working :-) the files) however the customer login can not, yet if you see the permissions for the file set, SHOULD be able to add/edit but those links are not showing up. Since I've discovered the strange block permission errors I'm wondering if there is more going on here?
mkly replied on at Permalink Reply
mkly
Hello,
My mistake those files should have been
/packages/document_library/blocks/document_library/view.php
to
/blocks/document_library/templates/delete_files/view.php

You only need to copy that one file. concrete5 uses an overrides system for things like this. Here a doc on creating custom templates if you'd like more info on that
http://www.concrete5.org/documentation/how-tos/designers/customize-...

Beyond that, before I look to far into the rest, could I get the version of concrete5 you are running? I'm not sure I checked that yet.

Best Wishes,
Mike
atsdenver replied on at Permalink Reply 1 Attachment
atsdenver
Ok, I've moved the folders into the right spot. That document was immensely helpful and so was the comment on overrides (looked into that too). that will help a ton moving forward, thanks!

Still have some issues - I've PM'd you for some clarification. When I apply the template, I get a constant "spinning wheel" icon. If then exit edit mode, it doesn't quite work right. I also lose the dashboard bar at the top, so I think some overrides are not working correctly... see shot 2

this COULD possibly be something with our custom theme, not sure.

Our site is running:
# concrete5 Version
5.6.0.2

It appears there is a permissions issue with blocks:
I posed the following:
http://www.concrete5.org/community/forums/usage/help-permissions-pr...

and someone gave me this in return:
http://www.concrete5.org/developers/bugs/5-6-1/cant-set-permissions...

I'm pretty sure this will prevent me from getting the edit and delete (once delete is working) functions for specific users until this is fixed.
mkly replied on at Permalink Reply 1 Attachment
mkly
Hello,
Were you able to make a backup and attempt and upgrade to 5.6.1.2?

I've attached the new view.php file to this post. You will need to rename it from view.php.txt to view.php

Best Wishes,
Mike
ConcreteCMS replied on at Permalink Reply
ConcreteCMS
Attention: Since there has been no activity on this issue for two weeks, this issue has been automatically archived.

To re-open this issue, reply to this message.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.