From: Koenderink, N. <Nic...@wu...> - 2011-01-04 13:53:59
|
Hi all, We are working on a semantic mediawiki (version 1.5.2). Our wiki has to be accessible for advanced users that can edit, but also for guests that are only allowed to see the content, but not the source of each page. We have created a guest account using the default rights management page (Special:SpecialPages under "Login/sign up" > create account, visible using the "Users and rights" pages). The rights for our guest are set to Read pages (read) (visible in Special:ListGroupRights). The guest is indeed not allowed to edit on the wiki. However, when he logs in, he still gets the option "View source". Is it possible to remove this option for our guest? We would be happy with all suggestions! Thanks for thinking along. Kind regards, Nicole |
From: Alex M. H. <amh...@on...> - 2011-01-05 11:45:44
|
Nicole, If you are using the Vector skin, the following patch should work--but it won't actually control the permissions (there are several other solutions for that). I'm not sure where I found the original code, but I am almost certain that it was on a Talk page on mediawiki.org. You can see it in action at http://ontolawgy.com. Copy your skins/Vector.php file to skins/Vector-orig.php, and then you can either apply the following patch manually or copy the text below into a file, name it something like Vector-hidetabs.patch, put it in the skins directory and run 'patch -p0 < Vector-hidetabs.patch' Down in the line -508/+510 area, you can add/remove what gets hidden as you see fit. Users may have to clear their cache for the restrictions to go through (alternatively, you should also be able to force that to happen from the server-side). If the mailing list or my email client insert extra line breaks and it becomes a problem, please let me know, and I can send you the patch as a text file, or just my whole Vector.php file. Hope this helps, Alex -- Alex M. Hendler ontolawgy™ LLC http://ontolawgy.com --- Vector-orig.php 2010-11-02 17:21:23.000000000 -0400 +++ Vector.php 2010-11-04 01:17:58.000000000 -0400 @@ -400,4 +400,5 @@ $this->data['variant_urls'] = $nav['variants']; // Build additional attributes for personal_urls + if($this->data['loggedin']==1){ foreach ( $this->data['personal_urls'] as $key => $item) { $this->data['personal_urls'][$key]['attributes'] = @@ -409,4 +410,5 @@ $this->data['personal_urls'][$key]['key'] = $this->skin->tooltipAndAccesskey('pt-'.$key); + } } @@ -508,4 +510,18 @@ <!-- /content --> <!-- header --> + <!-- No extra tabs for users who can not edit --> + <?php global $wgUser; if( !$wgUser->isAllowed('edit') ) { ?> + <style type="text/css"> + body.page-Main_Page h1.firstHeading { display: none !important; } + #ca-nstab-main { display: none !important; } + #ca-talk { display: none !important; } + #ca-viewsource { display: none !important; } + #ca-edit { display: none !important; } + #ca-view { display: none !important; } + #ca-history { display: none !important; } + #ca-delete { display: none !important; } + #ca-move { display: none !important; } + </style> + <?php } ?> <div id="mw-head" class="noprint"> <?php $this->renderNavigation( 'PERSONAL' ); ?> ----Original Message----- From: Koenderink, Nicole <Nic...@wu...> To: 'sem...@li...' <sem...@li...> Subject: [Semediawiki-user] SMW question concerning user rights Date: Tue, 4 Jan 2011 14:53:39 +0100 Hi all, We are working on a semantic mediawiki (version 1.5.2). Our wiki has to be accessible for advanced users that can edit, but also for guests that are only allowed to see the content, but not the source of each page. We have created a guest account using the default rights management page (Special:SpecialPages under "Login/sign up" > create account, visible using the "Users and rights" pages). The rights for our guest are set to Read pages (read) (visible in Special:ListGroupRights). The guest is indeed not allowed to edit on the wiki. However, when he logs in, he still gets the option "View source". Is it possible to remove this option for our guest? We would be happy with all suggestions! Thanks for thinking along. Kind regards, Nicole ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Semediawiki-user mailing list Sem...@li... https://lists.sourceforge.net/lists/listinfo/semediawiki-user |
From: Thomas S. <sch...@on...> - 2011-01-10 13:37:04
|
Hi Nicole, maybe you want to take a look at HaloACL. (See http://smwforum.ontoprise.com/smwforum/index.php/Help:HaloAccessControlList) It does not hide the entry "View source" (as this is a standard MW behaviour if editing is prohibited) but it shows an error message when the entry is clicked. So unauthorized users will not see the article's wiki text. Furthermore HaloACL has much more fine grained abilities for protecting single articles, instances of categories and namespaces and even semantic properties. You can also define hierarchies of user groups or use groups from an LDAP server. Best regards, Thomas Am 04.01.2011 14:53, schrieb Koenderink, Nicole: > Hi all, > > We are working on a semantic mediawiki (version 1.5.2). > > Our wiki has to be accessible for advanced users that can edit, but also for guests that are only allowed to see the content, but not the source of each page. We have created a guest account using the default rights management page (Special:SpecialPages under "Login/sign up"> create account, visible using the "Users and rights" pages). The rights for our guest are set to Read pages (read) (visible in Special:ListGroupRights). > > The guest is indeed not allowed to edit on the wiki. However, when he logs in, he still gets the option "View source". Is it possible to remove this option for our guest? > > We would be happy with all suggestions! Thanks for thinking along. > > Kind regards, > Nicole > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |
From: Neill M. <ne...@nl...> - 2011-01-12 11:23:41
|
Hi. Please note that HacloACL, as documented, only supports SMW up to version 1.5.2 as patches are required. Patches are also required for MW and Semantic Forms (with patches only available up to version 2.0.0). HaloACL also adds tables to the database. All this makes upgrading challenging. This is all fine if you are comfortable with applying patches and plan to stick to particular versions of MW, SMW and SF - e.g. MW 1.16.0, SMW 1.5.2 and SF 2.0.0. Regards Neill. On 10/01/11 13:37, Thomas Schweitzer wrote: > Hi Nicole, > > maybe you want to take a look at HaloACL. (See > http://smwforum.ontoprise.com/smwforum/index.php/Help:HaloAccessControlList) > > It does not hide the entry "View source" (as this is a standard MW > behaviour if editing is prohibited) but it shows an error message when > the entry is clicked. So unauthorized users will not see the article's > wiki text. > Furthermore HaloACL has much more fine grained abilities for protecting > single articles, instances of categories and namespaces and even > semantic properties. You can also define hierarchies of user groups or > use groups from an LDAP server. > > Best regards, > Thomas > > Am 04.01.2011 14:53, schrieb Koenderink, Nicole: >> Hi all, >> >> We are working on a semantic mediawiki (version 1.5.2). >> >> Our wiki has to be accessible for advanced users that can edit, but also for guests that are only allowed to see the content, but not the source of each page. We have created a guest account using the default rights management page (Special:SpecialPages under "Login/sign up"> create account, visible using the "Users and rights" pages). The rights for our guest are set to Read pages (read) (visible in Special:ListGroupRights). >> >> The guest is indeed not allowed to edit on the wiki. However, when he logs in, he still gets the option "View source". Is it possible to remove this option for our guest? >> >> We would be happy with all suggestions! Thanks for thinking along. >> >> Kind regards, >> Nicole >> >> >> >> ------------------------------------------------------------------------------ >> Learn how Oracle Real Application Clusters (RAC) One Node allows customers >> to consolidate database storage, standardize their database environment, and, >> should the need arise, upgrade to a full multi-node Oracle RAC database >> without downtime or disruption >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> Semediawiki-user mailing list >> Sem...@li... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> > > > ------------------------------------------------------------------------------ > Gaining the trust of online customers is vital for the success of any company > that requires sensitive data to be transmitted over the Web. Learn how to > best implement a security strategy that keeps consumers' information secure > and instills the confidence they need to proceed with transactions. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Semediawiki-user mailing list > Sem...@li... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > |