473,396 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

SecurityAction.Demand Question...

In my data access layer, I have permissions on each method similar to:

<PrincipalPermission(SecurityAction.Demand, Authenticated:=True,
Role:="modifyProspects")_
Public Overrides Function AddTracking(someVars...ect...) As Integer

End Function

During conversion to a new database some records may not have information
associated with them and thus a table cannot be created for this tracking
information. In my code I detect that if information does not exist, and
then simply add default values, but in order to do this as seen above I need
the manageProspects role. Is there a way to assert a permission on the
method below that can bypass the "manageProspects" role so that information
can be added when any user opens a prospect that has missing information?

Public Shared Function SelectTracking(ByVal prospect As
MarketingProspect) As Tracking
Dim dbConn As DataAccessLayer.DataAccessBase =
DataAccessLayer.DataAccessBaseHelper.GetDataAccess Layer
Dim dt As Data.DataTable = dbConn.SelectTracking(prospect.MktgId)

'If tracking information is missing, we can quickly add it with
its default values.
'This table is extremely important to reporting, but for
normalization, it was placed
'into another table. In the event that the transaction fails on
this table we need an entry.
'We will impersonate a user with higher permissions to
accomplish this task.
If dt.Rows.Count = 0 Then
Dim trk As New Tracking(Nothing, Nothing, Nothing, Nothing,
Nothing, StatusType.StatusTypes.Prospect)
trk.Add(prospect) '<-- HERE IS WHERE I NEED TO BYPASS
PERMISSIONS
Return trk
Else
etc...
End If
Jul 5 '06 #1
0 1681

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: fortepianissimo | last post by:
We all know that using __getattr__() we can compute an instance variable on demand, for example: class Foo: def __getattr__ (self, name): if name == 'bar': self.bar = 'apple' return self.bar...
242
by: James Cameron | last post by:
Hi I'm developing a program and the client is worried about future reuse of the code. Say 5, 10, 15 years down the road. This will be a major factor in selecting the development language. Any...
1
by: Earth Worm Jim | last post by:
I have a base class in an assembly that I want to add the following attribute: The assembly is strong named and all the derived classes are in the same assembly. The problem that arises is...
0
by: andrew lowe | last post by:
Hi We have windows application and have created our own custom principle & identity objects that implement IPrinciple and IIdentity. When a user logs into our system we set the threads principle...
0
by: Alvaro Pereira | last post by:
I’m using VS 2003 (Microsoft.Net Framework 1.1) and I’m trying to use PerformanceCounterPermissionAttribute with SecurityAction.RequestOption in my assembly.cs file.When I use...
6
by: Venkatesh | last post by:
Hello All, I have couple of doubts regarding the concept of on-demand javascript loading using javascript code. I could see on the net different techniques for achieving this - techniques like:...
1
by: menyki | last post by:
am writing a program to determine the best price that will attract maximum demand. first i had to generate random number to enable me determine the price and quantity demanded at the particular...
6
by: vunet.us | last post by:
I have an HTML page with included JS file like: <script language="javascript" type="text/javascript" src="file.js"></ script> The file.js has a set of functions and global initializer for some...
3
by: Jeroen | last post by:
Hi, Normally my programming style is as follows: /****************/ if ( SomeObject.CanYouDoThis() == true) SomeObject.DoStuff(); else MessageBox.Show("Nope, sowwy..."); /****************/
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.