channel rights
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > channel rights




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    channel rights  
Mei Ying [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-20-04 07:46 AM

Hi

That's correct. When subscribers are not given access to
the channel, they will not be able to see its postings, or
for this matter, the posting's placeholder content -
programatically or otherwise.

There are several ways to get around this:
1. Create two connected postings. One posting is stored in
the administrators channel. The other in the subscribers
channel. The posting meant for subscribers will only have
placeholder controls for the shared content so subscribers
will not see the restricted content.

2. Impersonate the a user with rights to the administrator
channel in code using the
CmsApplicationContext.AuthenticateAsUser() method. No
doubt, it's not the best method as it requires you to code
the user name, password and possibly grant an account that
is not an administrator, rights to view the content.

Btw, don't use RawContent. See this post in Stefan's blog
for a good reason why you shouldn't :-)
http://weblogs.asp.net/stefan_gossn...e/2004/04/24/11
9546.aspx

HTH
Mei Ying
---
Blog: http://meiyinglim.blogspot.com
Contact: meiyinglim@hotmail.com
---
>-----Original Message-----
>Can I do this in MCMS?:
>A part of my site should only be accessible to
administrators. Another part
>is accessible to all subscribers.
>BUT the subscriber part of the site uses parts of
postings from the
>administrator part.
>For instance I use
>Posting.Placeholders[".."].Datasource.RawContent
>in the subscriber part on postings which should only be
directly accesible
>to administrators.
>Or in other words I display postings to subscribers
indirectly. And these
>postings should also be directly accessible to
administrators.
>It seems that the problem is that when I use rights in
site manager to
>restrict the access to the admin part of the site, I can
no longer access
>these postings programmatically from code executed when a
subscriber is
>logged in.
>
>Is there a solution?
>
>Hope you can help me.
>
>Thanks
>Nikolaj
>.
>





[ Post a follow-up to this message ]



    RE: channel rights  
Nikolaj


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-20-04 07:46 AM

Thanks for your answer..
solution 1:
I don't think this will solve my problem, since I do not want the posting to
be available to subscribers in any form except broken into pieces and used i
n
other postings.
In other words.. I have postings of type a and postings of type b. a should
only be directly visible to the administrator as explained. Postings of type
b are directly available to subscribers and contains content from
placeholders of postings of type a.

solution 2:
I will look at this. I'm not sure exactly what you mean, but might help if I
read some documentation on the method for starters.. 

Again, thanks for your answer.. great newsgroup.

Nikolaj

"Mei Ying [MVP]" wrote:

> Hi
>
> That's correct. When subscribers are not given access to
> the channel, they will not be able to see its postings, or
> for this matter, the posting's placeholder content -
> programatically or otherwise.
>
> There are several ways to get around this:
> 1. Create two connected postings. One posting is stored in
> the administrators channel. The other in the subscribers
> channel. The posting meant for subscribers will only have
> placeholder controls for the shared content so subscribers
> will not see the restricted content.
>
> 2. Impersonate the a user with rights to the administrator
> channel in code using the
> CmsApplicationContext.AuthenticateAsUser() method. No
> doubt, it's not the best method as it requires you to code
> the user name, password and possibly grant an account that
> is not an administrator, rights to view the content.
>
> Btw, don't use RawContent. See this post in Stefan's blog
> for a good reason why you shouldn't :-)
> http://weblogs.asp.net/stefan_gossn...e/2004/04/24/11
> 9546.aspx
>
> HTH
> Mei Ying
> ---
> Blog: http://meiyinglim.blogspot.com
> Contact: meiyinglim@hotmail.com
> --- 
> administrators. Another part 
> postings from the 
> directly accesible 
> indirectly. And these 
> administrators. 
> site manager to 
> no longer access 
> subscriber is 
>





[ Post a follow-up to this message ]



    RE: channel rights  
Mei Ying [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-20-04 12:47 PM

Hi

You may find these resources useful:

1. Stefan's render placeholder control example, which
essentially performs the task of reading off content from
a placeholder in a specific posting. This may solve half
your problem:
http://www.gotdotnet.com/Community/...es/Details.aspx
?SampleGuid=1045e51d-f83d-4caf-99b9-8b395b722f24

2. CmsApplicationContext.AuthenticateAsUser() is
documented here:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/sitedevl/htm/ frlrfmicrosoftcontentmanagementpublishin
gcm
 sapplicationcontextclassauthenticateasus
ertopic.asp

Basically, the idea is to use it to "impersonate" someone
with access to read the posting's placeholder content into
(1). As mentioned before, this is probably not the best
solution, but it will do what you plan to do.

Having said that, do re-consider organising the postings
into containers that relate to their rights. It's
definitely a neater solution :-)

regards
Mei Ying

>-----Original Message-----
>Thanks for your answer..
>solution 1:
>I don't think this will solve my problem, since I do not
want the posting to
>be available to subscribers in any form except broken
into pieces and used in
>other postings.
>In other words.. I have postings of type a and postings
of type b. a should
>only be directly visible to the administrator as
explained. Postings of type
>b are directly available to subscribers and contains
content from
>placeholders of postings of type a.
>
>solution 2:
>I will look at this. I'm not sure exactly what you mean,
but might help if I
>read some documentation on the method for starters.. 
>
>Again, thanks for your answer.. great newsgroup.
>
>Nikolaj
>
>"Mei Ying [MVP]" wrote:
> 
to[vbcol=seagreen] 
or[vbcol=seagreen] 
in[vbcol=seagreen] 
subscribers[vbcol=seagreen] 
have[vbcol=seagreen] 
subscribers[vbcol=seagreen] 
administrator[vbcol=seagreen] 
code[vbcol=seagreen] 
that[vbcol=seagreen] 
blog[vbcol=seagreen] 
http://weblogs.asp.net/stefan_gossn...e/2004/04/24/11[vbcol=seagreen] 
be[vbcol=seagreen] 
can[vbcol=seagreen] 
when a[vbcol=seagreen] 
>.
>





[ Post a follow-up to this message ]



    RE: channel rights  
Nikolaj


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
10-20-04 12:47 PM

Thanks again. I will look into the mentioned resources.

About the design: I would like to hear your (or someones) oppinion on the
way that I have organised the site.
I think the idea of having postings (again, lets call them A) which should
never be displayed to subscribers makes alot of sence and it works very well
except for the problems with rights.
The postings of type A contains a number of html-placeholders. The content
of these are used inside the postings of type B. Since I cannot display an
entire posting inside another posting (except when using frames) this is the
only solution I can think of. So this basic idea seemed very natural to me,
until I bumped into the rights problem. Now I'm starting to worry that I am
going against basic principles of the mcms.. Am I? and if yes, then is there
another and "neater" solution to the basic problem of displaying pieces of
postings (A) inside other postings (B) without making A directly visible to
subscribers?

"Mei Ying [MVP]" wrote:

> Hi
>
> You may find these resources useful:
>
> 1. Stefan's render placeholder control example, which
> essentially performs the task of reading off content from
> a placeholder in a specific posting. This may solve half
> your problem:
> http://www.gotdotnet.com/Community/...es/Details.aspx
> ?SampleGuid=1045e51d-f83d-4caf-99b9-8b395b722f24
>
> 2. CmsApplicationContext.AuthenticateAsUser() is
> documented here:
> http://msdn.microsoft.com/library/default.asp?
> url=/library/en-
> us/sitedevl/htm/ frlrfmicrosoftcontentmanagementpublishin
gcm
>  sapplicationcontextclassauthenticateasus
ertopic.asp
>
> Basically, the idea is to use it to "impersonate" someone
> with access to read the posting's placeholder content into
> (1). As mentioned before, this is probably not the best
> solution, but it will do what you plan to do.
>
> Having said that, do re-consider organising the postings
> into containers that relate to their rights. It's
> definitely a neater solution :-)
>
> regards
> Mei Ying
> 
> want the posting to 
> into pieces and used in 
> of type b. a should 
> explained. Postings of type 
> content from 
> but might help if I 
> to 
> or 
> in 
> subscribers 
> have 
> subscribers 
> administrator 
> code 
> that 
> blog 
> http://weblogs.asp.net/stefan_gossn...e/2004/04/24/11 
> be 
> can 
> when a 
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 12:41 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register